|
@@ -48,6 +48,7 @@ class AutoloadGenerator
|
|
|
|
|
|
$relVendorPath = $filesystem->findShortestPath(getcwd(), $vendorPath, true);
|
|
|
$vendorPathCode = $filesystem->findShortestPathCode(realpath($targetDir), $vendorPath, true);
|
|
|
+ $vendorPathCode52 = str_replace('__DIR__', 'dirname(__FILE__)', $vendorPathCode);
|
|
|
$vendorPathToTargetDirCode = $filesystem->findShortestPathCode($vendorPath, realpath($targetDir), true);
|
|
|
|
|
|
$appBaseDirCode = $filesystem->findShortestPathCode($vendorPath, getcwd(), true);
|
|
@@ -58,7 +59,7 @@ class AutoloadGenerator
|
|
|
|
|
|
// autoload_namespaces.php generated by Composer
|
|
|
|
|
|
-\$vendorDir = $vendorPathCode;
|
|
|
+\$vendorDir = $vendorPathCode52;
|
|
|
\$baseDir = $appBaseDirCode;
|
|
|
|
|
|
return array(
|
|
@@ -88,7 +89,7 @@ EOF;
|
|
|
|
|
|
// autoload_classmap.php generated by Composer
|
|
|
|
|
|
-\$vendorDir = $vendorPathCode;
|
|
|
+\$vendorDir = $vendorPathCode52;
|
|
|
\$baseDir = $appBaseDirCode;
|
|
|
|
|
|
return array(
|
|
@@ -180,7 +181,7 @@ EOF;
|
|
|
|
|
|
file_put_contents($targetDir.'/autoload_namespaces.php', $namespacesFile);
|
|
|
file_put_contents($targetDir.'/autoload_classmap.php', $classmapFile);
|
|
|
- if ($includePathFile = $this->getIncludePathsFile($packageMap, $filesystem, $relVendorPath, $vendorPath, $vendorPathCode, $appBaseDirCode)) {
|
|
|
+ if ($includePathFile = $this->getIncludePathsFile($packageMap, $filesystem, $relVendorPath, $vendorPath, $vendorPathCode52, $appBaseDirCode)) {
|
|
|
file_put_contents($targetDir.'/include_paths.php', $includePathFile);
|
|
|
}
|
|
|
file_put_contents($vendorPath.'/autoload.php', $this->getAutoloadFile($vendorPathToTargetDirCode, $suffix));
|