Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] fix wiring of annotations.cached_reader#46427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice.
chalasr commentedMay 21, 2022
(would be even better with a test case if possible) |
stof left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Would be great to add a test fetching the annotation reader public service from the container as a functional test
| $tagsToKeep =$container->hasParameter('container.behavior_describing_tags') | ||
| ?$container->getParameter('container.behavior_describing_tags') | ||
| : ['container.do_not_inline','container.service_locator','container.service_subscriber']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
should those be merged with the parameter instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think so: giving full control to the parameter is more flexible to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
but does it really make sense to disable core ones ? It would mean that if a project customizes the list, they would not benefit from new additions done in the core like this bugfix until they discover this internal change to the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This tag is already used inResolveInstanceofConditionalsPass where ishas to containcontainer.service_locator and other core tags. This code doesn't introduce anything new to me, convention-wise (since this parameter works by convention).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ok
nicolas-grekas commentedMay 23, 2022
Test added. Status: needs review |
Alsofixes#26088 (comment)
Instead of trying to hack the compilation of the container to prevent it from inlining
annotations.cached_reader, this PR relies on ancontainer.do_not_inlinetag that just does that, prevent inlining so that removing passes can reliably fetch the corresponding services from the container by id or by tag.