1
0
Fork 0

Merge pull request #950 from taylorotwell/master

Fix the handling of file auto-loads.
pull/961/head
Nils Adermann 2012-07-27 21:25:29 -07:00
commit 98743ba95b
2 changed files with 3 additions and 7 deletions

View File

@ -127,11 +127,7 @@ EOF;
$filesCode = ""; $filesCode = "";
$autoloads['files'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['files'])); $autoloads['files'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['files']));
foreach ($autoloads['files'] as $functionFile) { foreach ($autoloads['files'] as $functionFile) {
if (!$filesystem->isAbsolutePath($functionFile)) { $filesCode .= ' require '.$this->getPathCode($filesystem, $relVendorPath, $vendorPath, $functionFile).";\n";
$functionFile = getcwd() . '/'. $functionFile;
}
$filesCode .= ' require __DIR__ . '. var_export('/'.$filesystem->findShortestPath($vendorPath, $functionFile), true).";\n";
} }
file_put_contents($targetDir.'/autoload_namespaces.php', $namespacesFile); file_put_contents($targetDir.'/autoload_namespaces.php', $namespacesFile);

View File

@ -21,8 +21,8 @@ return call_user_func(function() {
$loader->register(); $loader->register();
require __DIR__ . '/a/a/test.php'; require $vendorDir . '/a/a/test.php';
require __DIR__ . '/b/b/test2.php'; require $vendorDir . '/b/b/test2.php';
return $loader; return $loader;
}); });