[Autoload] Set $vendorDir et $baseDir in ComposerAutoloaderInitTargetDir::getLoader()
parent
4c82c35dbc
commit
d2dc73e361
|
@ -137,7 +137,7 @@ EOF;
|
|||
file_put_contents($targetDir.'/include_paths.php', $includePathFile);
|
||||
}
|
||||
file_put_contents($vendorPath.'/autoload.php', $this->getAutoloadFile($vendorPathToTargetDirCode, $suffix));
|
||||
file_put_contents($targetDir.'/autoload_real'.$suffix.'.php', $this->getAutoloadRealFile(true, true, (bool) $includePathFile, $targetDirLoader, $filesCode, $suffix));
|
||||
file_put_contents($targetDir.'/autoload_real'.$suffix.'.php', $this->getAutoloadRealFile(true, true, (bool) $includePathFile, $targetDirLoader, $filesCode, $vendorPathCode, $appBaseDirCode, $suffix));
|
||||
copy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ return ComposerAutoloaderInit$suffix::getLoader();
|
|||
AUTOLOAD;
|
||||
}
|
||||
|
||||
protected function getAutoloadRealFile($usePSR0, $useClassMap, $useIncludePath, $targetDirLoader, $filesCode, $suffix)
|
||||
protected function getAutoloadRealFile($usePSR0, $useClassMap, $useIncludePath, $targetDirLoader, $filesCode, $vendorPathCode, $appBaseDirCode, $suffix)
|
||||
{
|
||||
// TODO the class ComposerAutoloaderInit should be revert to a closure
|
||||
// when APC has been fixed:
|
||||
|
@ -321,6 +321,8 @@ class ComposerAutoloaderInit$suffix
|
|||
public static function getLoader()
|
||||
{
|
||||
\$loader = new \\Composer\\Autoload\\ClassLoader();
|
||||
\$vendorDir = $vendorPathCode;
|
||||
\$baseDir = $appBaseDirCode;
|
||||
|
||||
|
||||
HEADER;
|
||||
|
|
|
@ -10,6 +10,8 @@ class ComposerAutoloaderInitFilesAutoload
|
|||
public static function getLoader()
|
||||
{
|
||||
$loader = new \Composer\Autoload\ClassLoader();
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
|
|
|
@ -10,6 +10,8 @@ class ComposerAutoloaderInitTargetDir
|
|||
public static function getLoader()
|
||||
{
|
||||
$loader = new \Composer\Autoload\ClassLoader();
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
|
|
Loading…
Reference in New Issue