1
0
Fork 0

Fix exclude-from-classmap being ignored when generating on-the-fly class loader, fixes #6503

pull/6545/head
Jordi Boggiano 2017-07-06 09:51:25 +02:00
parent b50eb26740
commit 47bc2fa51a
1 changed files with 6 additions and 1 deletions

View File

@ -433,9 +433,14 @@ EOF;
}
if (isset($autoloads['classmap'])) {
$blacklist = null;
if (!empty($autoloads['exclude-from-classmap'])) {
$blacklist = '{(' . implode('|', $autoloads['exclude-from-classmap']) . ')}';
}
foreach ($autoloads['classmap'] as $dir) {
try {
$loader->addClassMap($this->generateClassMap($dir, null, null, false));
$loader->addClassMap($this->generateClassMap($dir, $blacklist, null, false));
} catch (\RuntimeException $e) {
$this->io->writeError('<warning>'.$e->getMessage().'</warning>');
}