Require file autoloads after the autoloader is registered
parent
fd776853a4
commit
adaa788955
|
@ -286,7 +286,7 @@ EOF;
|
|||
if (!class_exists('Composer\\\\Autoload\\\\ClassLoader', false)) {
|
||||
require $vendorPathToTargetDirCode . '/ClassLoader.php';
|
||||
}
|
||||
$filesCode
|
||||
|
||||
return call_user_func(function() {
|
||||
\$loader = new \\Composer\\Autoload\\ClassLoader();
|
||||
\$composerDir = $vendorPathToTargetDirCode;
|
||||
|
@ -328,10 +328,10 @@ CLASSMAP;
|
|||
|
||||
$file .= $targetDirLoader;
|
||||
|
||||
return $file . <<<'FOOTER'
|
||||
$loader->register();
|
||||
|
||||
return $loader;
|
||||
return $file . <<<FOOTER
|
||||
\$loader->register();
|
||||
$filesCode
|
||||
return \$loader;
|
||||
});
|
||||
|
||||
FOOTER;
|
||||
|
|
|
@ -5,9 +5,6 @@ if (!class_exists('Composer\\Autoload\\ClassLoader', false)) {
|
|||
require __DIR__ . '/composer' . '/ClassLoader.php';
|
||||
}
|
||||
|
||||
require __DIR__ . '/a/a/test.php';
|
||||
require __DIR__ . '/b/b/test2.php';
|
||||
|
||||
return call_user_func(function() {
|
||||
$loader = new \Composer\Autoload\ClassLoader();
|
||||
$composerDir = __DIR__ . '/composer';
|
||||
|
@ -24,5 +21,8 @@ return call_user_func(function() {
|
|||
|
||||
$loader->register();
|
||||
|
||||
require __DIR__ . '/a/a/test.php';
|
||||
require __DIR__ . '/b/b/test2.php';
|
||||
|
||||
return $loader;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue