From d2ab0d80199669091c3bd08b5e32ae6de3298f7d Mon Sep 17 00:00:00 2001 From: "hubert.lenoir" Date: Fri, 13 Oct 2017 18:51:13 +0200 Subject: [PATCH] =?UTF-8?q?[Debug]=C2=A0Fix=20same=20vendor=20detection=20?= =?UTF-8?q?in=20class=20loader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Symfony/Component/Debug/DebugClassLoader.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 160e945ccbbe0..84c0f663c5bd6 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -203,18 +203,11 @@ public function loadClass($class) } 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);