diff --git a/lib/Doctrine/Common/Annotations/DocParser.php b/lib/Doctrine/Common/Annotations/DocParser.php index 1421eb803..b1dcf3b05 100644 --- a/lib/Doctrine/Common/Annotations/DocParser.php +++ b/lib/Doctrine/Common/Annotations/DocParser.php @@ -752,7 +752,7 @@ private function Annotation() // verify that the class is really meant to be an annotation and not just any ordinary class if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$originalName])) { + if ($this->isIgnoredAnnotation($name)) { return false; } diff --git a/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php b/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php index f67199540..07f5a0593 100644 --- a/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php +++ b/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php @@ -1055,7 +1055,6 @@ public function provideTestIgnoreWholeNamespaces() public function testNotAnAnnotationClassIsIgnoredWithoutWarning() { $parser = new DocParser(); - $parser->setIgnoreNotImportedAnnotations(true); $parser->setIgnoredAnnotationNames([\PHPUnit\Framework\TestCase::class => true]); $result = $parser->parse('@\PHPUnit\Framework\TestCase');