diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 310f7d4e2247..e6ae0920736d 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -233,7 +233,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class) // Detect annotations on the class if (false !== $doc = $refl->getDocComment()) { foreach (['final', 'deprecated', 'internal'] as $annotation) { - if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) { + if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) { self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : ''; } } diff --git a/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php b/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php index 64e12ccf0ef4..4c2b0aaf351f 100644 --- a/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php +++ b/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php @@ -64,7 +64,6 @@ class FinalClass6 * @author John Doe * * @final another - * * multiline comment... * * @return string