Merge pull request #2187 from benjisg/fix-AutoloadNamespacesGenerator
Fixes the autoload_namespaces generatorpull/2195/head
commit
c0b889a78a
|
@ -330,7 +330,11 @@ EOF;
|
||||||
$baseDir = '';
|
$baseDir = '';
|
||||||
if (strpos($path, $vendorPath) === 0) {
|
if (strpos($path, $vendorPath) === 0) {
|
||||||
$path = substr($path, strlen($vendorPath));
|
$path = substr($path, strlen($vendorPath));
|
||||||
$baseDir = '$vendorDir . ';
|
$baseDir = '$vendorDir';
|
||||||
|
|
||||||
|
if ($path !== false) {
|
||||||
|
$baseDir .= " . ";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$path = $filesystem->normalizePath($filesystem->findShortestPath($basePath, $path, true));
|
$path = $filesystem->normalizePath($filesystem->findShortestPath($basePath, $path, true));
|
||||||
if (!$filesystem->isAbsolutePath($path)) {
|
if (!$filesystem->isAbsolutePath($path)) {
|
||||||
|
@ -343,7 +347,7 @@ EOF;
|
||||||
$baseDir = "'phar://' . " . $baseDir;
|
$baseDir = "'phar://' . " . $baseDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $baseDir.var_export($path, true);
|
return $baseDir . (($path !== false) ? var_export($path, true) : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix)
|
protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix)
|
||||||
|
|
Loading…
Reference in New Issue