-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI] Move non removing compiler passes to after removing passes #32332
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LGTM but there are related failing test cases, could you please have a look? |
ea0f681
to
88196ef
Compare
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 rebased on 4.4 and fixed tests)
@nicolas-grekas thank you! This slipped from my radar! |
Thank you @alexpott. |
…ng passes (alexpott) This PR was merged into the 4.4 branch. Discussion ---------- [DI] Move non removing compiler passes to after removing passes | Q | A | ------------- | --- | Branch? | Not sure - feels like something that should only change in a major version but /shrug | Bug fix? | no | New feature? | no | BC breaks? | Is where each pass runs in PassConfig considered an API - not sure. | Deprecations? | no | Tests pass? | yes - no tests added because this is a sort of config change | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> At the moment PassConfig adds CheckExceptionOnInvalidReferenceBehaviorPass and ResolveHotPathPass as TYPE_REMOVE. But they don't remove services. This means that if you add a removing pass you need to run before all the other removing passes. You can use priority to do this but I think adding these passes here is logically a bit odd when TYPE_AFTER_REMOVING exists and could be leveraged. I made this change against the master branch because maybe this is something you'd only want to change in a major version - not sure. Commits ------- 88196ef [DI] Move non removing compiler passes to after removing passes
This is necessary because symfony/symfony#32332 configures some
@alexpott looks like this was indeed a BC-break, see https://travis-ci.org/sonata-project/SonataCoreBundle/jobs/617863917#L572-L590 |
@greg0ire it should be fixed in SymfonyTest/SymfonyDependencyInjectionTest#125 |
) This is necessary because symfony/symfony#32332 configures some
At the moment PassConfig adds CheckExceptionOnInvalidReferenceBehaviorPass and ResolveHotPathPass as TYPE_REMOVE. But they don't remove services. This means that if you add a removing pass you need to run before all the other removing passes. You can use priority to do this but I think adding these passes here is logically a bit odd when TYPE_AFTER_REMOVING exists and could be leveraged.
I made this change against the master branch because maybe this is something you'd only want to change in a major version - not sure.