1
0
Fork 0

Re-enable include path even when classmap authoritative is present, refs #4556

pull/4757/head
Jordi Boggiano 2016-01-09 19:12:26 +00:00
parent e05207dbad
commit bda2c0f9b7
1 changed files with 18 additions and 22 deletions

View File

@ -568,34 +568,30 @@ class ComposerAutoloaderInit$suffix
HEADER; HEADER;
if (!$this->classMapAuthoritative) { if ($useIncludePath) {
if ($useIncludePath) { $file .= <<<'INCLUDE_PATH'
$file .= <<<'INCLUDE_PATH' $includePaths = require __DIR__ . '/include_paths.php';
$includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path());
array_push($includePaths, get_include_path()); set_include_path(join(PATH_SEPARATOR, $includePaths));
set_include_path(join(PATH_SEPARATOR, $includePaths));
INCLUDE_PATH; INCLUDE_PATH;
} }
$file .= <<<'PSR0' if (!$this->classMapAuthoritative) {
$map = require __DIR__ . '/autoload_namespaces.php'; $file .= <<<'PSR04'
foreach ($map as $namespace => $path) { $map = require __DIR__ . '/autoload_namespaces.php';
$loader->set($namespace, $path); foreach ($map as $namespace => $path) {
} $loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
PSR0; PSR04;
$file .= <<<'PSR4'
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
PSR4;
} }
if ($useClassMap) { if ($useClassMap) {