Skip to content

Update AnnotationReader's metadata parser to use list of known ignored annotation#240

Closed
sanmai wants to merge 10 commits intodoctrine:1.12.xfrom
sanmai:pr/1.6/backport-235
Closed

Update AnnotationReader's metadata parser to use list of known ignored annotation#240
sanmai wants to merge 10 commits intodoctrine:1.12.xfrom
sanmai:pr/1.6/backport-235

Conversation

@sanmai
Copy link
Copy Markdown
Contributor

@sanmai sanmai commented Jan 30, 2019

A parser used to collect parsing metadata basically ignores a known list of globally ignored annotation names, goes through loops checking annotations that do not need any checking. Let's fix that by communicating the list during initialization.

This is a backported fix from #235.

Jonathan H. Wage and others added 10 commits May 8, 2018 02:29
package name seems wrong
…d annotation

A parser used to collect parsing metadata basically ignores a known list of globally ignored annotation names, goes through loops checking annotations that do not need any checking. Let's fix that by communicating the list during initialization.
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader($testLoader);

try {
self::assertNotNull($reader->getClassAnnotations($class));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike #235, in this case getClassAnnotations() returns non-empty array. I guess testInvalidAnnotationButIgnored is broken, but fixing it proper should be done in a different PR.

$reader = $this->getReader();
$class = new \ReflectionClass(Fixtures\ClassDDC1660::class);

$active = true;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way to disable this autoloader would be using a ReflectionProperty like in AnnotationRegistryTest, not sure if it is any better.

@alcaeus alcaeus changed the base branch from 1.6 to master April 1, 2020 11:27
@greg0ire greg0ire changed the base branch from master to 1.12.x January 1, 2021 19:15
@derrabus
Copy link
Copy Markdown
Member

Let's close the PR. I think it's obsolete.

@derrabus derrabus closed this Aug 14, 2023
@sanmai sanmai deleted the pr/1.6/backport-235 branch August 14, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants