mirror of
https://github.com/composer/composer
synced 2025-05-10 00:53:06 +00:00
Fix optimized autoloader generation for PSR-0 configs that include non-existent dirs, fixes #1286
This commit is contained in:
parent
ead17b2680
commit
c5f3a6febd
2 changed files with 21 additions and 0 deletions
|
@ -126,6 +126,9 @@ EOF;
|
|||
preg_quote(rtrim($dir, '/')),
|
||||
strpos($namespace, '_') === false ? preg_quote(strtr($namespace, '\\', '/')) : ''
|
||||
);
|
||||
if (!is_dir($dir)) {
|
||||
continue;
|
||||
}
|
||||
foreach (ClassMapGenerator::createMap($dir, $whitelist) as $class => $path) {
|
||||
if ('' === $namespace || 0 === strpos($class, $namespace)) {
|
||||
$path = '/'.$filesystem->findShortestPath(getcwd(), $path, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue