[Debug] Fix same vendor detection in class loader

This commit is contained in:
hubert.lenoir 2017-10-13 18:51:13 +02:00
parent 5e0bb5f973
commit d2ab0d8019
1 changed files with 2 additions and 9 deletions

View File

@ -203,18 +203,11 @@ class DebugClassLoader
} elseif (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) {
self::$deprecated[$name] = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]);
} else {
if (2 > $len = 1 + (strpos($name, '\\', 1 + strpos($name, '\\')) ?: strpos($name, '_'))) {
if (2 > $len = 1 + (strpos($name, '\\') ?: strpos($name, '_'))) {
$len = 0;
$ns = '';
} else {
switch ($ns = substr($name, 0, $len)) {
case 'Symfony\Bridge\\':
case 'Symfony\Bundle\\':
case 'Symfony\Component\\':
$ns = 'Symfony\\';
$len = strlen($ns);
break;
}
$ns = substr($name, 0, $len);
}
$parent = get_parent_class($class);