Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Jul 18, 2019

Conversation

alexpott
Copy link
Contributor

@alexpott alexpott commented Jul 3, 2019

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 #...
License MIT
Doc PR symfony/symfony-docs#...

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.

@alexpott alexpott changed the base branch from 4.4 to master July 3, 2019 08:23
@nicolas-grekas
Copy link
Member

LGTM but there are related failing test cases, could you please have a look?
Also, this should target 4.4. Thanks.

@nicolas-grekas nicolas-grekas added this to the next milestone Jul 3, 2019
@nicolas-grekas nicolas-grekas changed the title Move non removing compiler passes to after removing passes [DI] Move non removing compiler passes to after removing passes Jul 17, 2019
@nicolas-grekas nicolas-grekas changed the base branch from master to 4.4 July 18, 2019 17:01
@nicolas-grekas nicolas-grekas force-pushed the move-non-removing-passes branch from ea0f681 to 88196ef Compare July 18, 2019 17:02
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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)

@alexpott
Copy link
Contributor Author

@nicolas-grekas thank you! This slipped from my radar!

@fabpot
Copy link
Member

fabpot commented Jul 18, 2019

Thank you @alexpott.

@fabpot fabpot merged commit 88196ef into symfony:4.4 Jul 18, 2019
fabpot added a commit that referenced this pull request Jul 18, 2019
…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
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
mhujer added a commit to mhujer/SymfonyDependencyInjectionTest that referenced this pull request Nov 24, 2019
@greg0ire
Copy link
Contributor

@alexpott looks like this was indeed a BC-break, see https://travis-ci.org/sonata-project/SonataCoreBundle/jobs/617863917#L572-L590

@mhujer
Copy link
Contributor

mhujer commented Nov 28, 2019

@greg0ire it should be fixed in SymfonyTest/SymfonyDependencyInjectionTest#125

Nyholm pushed a commit to SymfonyTest/SymfonyDependencyInjectionTest that referenced this pull request Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants