mirror of
https://github.com/composer/composer
synced 2025-05-09 16:42:57 +00:00
Always prepend autoloaders to avoid tools (i.e. phpunit) taking precedence over the project autoloader
This commit is contained in:
parent
1356021cb9
commit
c80cb76b9b
4 changed files with 6 additions and 6 deletions
|
@ -405,7 +405,7 @@ CLASSMAP;
|
|||
|
||||
if ($targetDirLoader) {
|
||||
$file .= <<<REGISTER_AUTOLOAD
|
||||
spl_autoload_register(array('ComposerAutoloaderInit$suffix', 'autoload'));
|
||||
spl_autoload_register(array('ComposerAutoloaderInit$suffix', 'autoload'), true, true);
|
||||
|
||||
|
||||
REGISTER_AUTOLOAD;
|
||||
|
@ -413,7 +413,7 @@ REGISTER_AUTOLOAD;
|
|||
}
|
||||
|
||||
$file .= <<<METHOD_FOOTER
|
||||
\$loader->register();{$filesCode}
|
||||
\$loader->register(true);{$filesCode}
|
||||
|
||||
return \$loader;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue