Skip to content

Commit

Permalink
Merge pull request #316 from alcaeus/fix-ignored-annotation-names
Browse files Browse the repository at this point in the history
Fix checks for ignored annotations
  • Loading branch information
alcaeus committed Apr 2, 2020
2 parents f9deab6 + f1eac35 commit 3d31fc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/Common/Annotations/DocParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion tests/Doctrine/Tests/Common/Annotations/DocParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 3d31fc1

Please sign in to comment.