1
0
Fork 0

Fixes the autoload_namespaces generator for packages in the root of the vendor directory

pull/2187/head
Benji Schwartz-Gilbert 2013-08-18 10:57:48 -07:00
parent 472037fb90
commit f5048059d8
1 changed files with 6 additions and 2 deletions

View File

@ -330,7 +330,11 @@ EOF;
$baseDir = '';
if (strpos($path, $vendorPath) === 0) {
$path = substr($path, strlen($vendorPath));
$baseDir = '$vendorDir . ';
$baseDir = '$vendorDir';
if ($path !== false) {
$baseDir .= " . ";
}
} else {
$path = $filesystem->normalizePath($filesystem->findShortestPath($basePath, $path, true));
if (!$filesystem->isAbsolutePath($path)) {
@ -343,7 +347,7 @@ EOF;
$baseDir = "'phar://' . " . $baseDir;
}
return $baseDir.var_export($path, true);
return $baseDir . (($path !== false) ? var_export($path, true) : "");
}
protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix)