Skip to content

Commit 78016fe

Browse files
committed
Consider autoloaders passed in -a
1 parent e12b4c4 commit 78016fe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Command/CommandHelper.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ public static function begin(
142142
}
143143
$currentWorkingDirectoryFileHelper = new FileHelper($currentWorkingDirectory);
144144
$currentWorkingDirectory = $currentWorkingDirectoryFileHelper->getWorkingDirectory();
145+
146+
/** @var array<callable>|false $autoloadFunctionsBefore */
147+
$autoloadFunctionsBefore = spl_autoload_functions();
148+
145149
if ($autoloadFile !== null) {
146150
$autoloadFile = $currentWorkingDirectoryFileHelper->absolutizePath($autoloadFile);
147151
if (!is_file($autoloadFile)) {
@@ -290,9 +294,6 @@ public static function begin(
290294
$createDir($tmpDir);
291295
}
292296

293-
/** @var array<callable>|false $autoloadFunctionsBefore */
294-
$autoloadFunctionsBefore = spl_autoload_functions();
295-
296297
try {
297298
$container = $containerFactory->create($tmpDir, $additionalConfigFiles, $paths, $composerAutoloaderProjectPaths, $analysedPathsFromConfig, $level ?? self::DEFAULT_LEVEL, $generateBaselineFile, $autoloadFile, $singleReflectionFile, $singleReflectionInsteadOfFile);
298299
} catch (InvalidConfigurationException | AssertionException $e) {

0 commit comments

Comments
 (0)