1
0
Fork 0

Merge remote-tracking branch 'till/bugfix-broken-classmap'

pull/931/head
Jordi Boggiano 2012-07-18 18:20:14 +02:00
commit d837b8a657
1 changed files with 9 additions and 2 deletions

View File

@ -118,8 +118,15 @@ EOF;
$autoloads['classmap'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['classmap'])); $autoloads['classmap'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['classmap']));
foreach ($autoloads['classmap'] as $dir) { foreach ($autoloads['classmap'] as $dir) {
foreach (ClassMapGenerator::createMap($dir) as $class => $path) { foreach (ClassMapGenerator::createMap($dir) as $class => $path) {
$classmapFile .= ' '.var_export($class, true) . ' => ';
if (0 === strpos($path, dirname($vendorPath), 0)) {
// this path seems to be located within this application/package
$path = '/' . $filesystem->findShortestPath(getcwd(), $path, true); $path = '/' . $filesystem->findShortestPath(getcwd(), $path, true);
$classmapFile .= ' '.var_export($class, true).' => $baseDir . '.var_export($path, true).",\n"; $classmapFile .= '$baseDir . ';
}
$classmapFile .= var_export($path, true).",\n";
} }
} }
$classmapFile .= ");\n"; $classmapFile .= ");\n";