-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Skip tags on abstract definitions when relevant #22388
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fb9780d
to
80c93c1
Compare
Merged
80c93c1
to
29fc137
Compare
there is a drawback here: if you tag an abstract service but without inheriting tags in child services, the registration will be silently skipped, making it harder to notice this. An exception would be better in this case. Is there a way to distinguish both cases (tags inherited by childs or no) ? |
fabpot
added a commit
that referenced
this pull request
Apr 12, 2017
This PR was merged into the 3.2 branch. Discussion ---------- Relax some mocks | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - We should not use mocks when it's not required - they too often run assertions on internal behavior. These changes will unlock #22388 Commits ------- 61be733 Relax some mocks
Continued in #22420 |
fabpot
added a commit
that referenced
this pull request
Apr 13, 2017
…las-grekas) This PR was squashed before being merged into the 3.3-dev branch (closes #22420). Discussion ---------- [DI] Make tagged abstract services throw earlier | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As spotted by @stof in #22388 (comment), skipping abstract tagged services removes an opportunity to report config mistakes to users. Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr). I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic. To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags. Commits ------- 388e4b3 [DI] Make tagged abstract services throw earlier cd06c12 Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
symfony-splitter
pushed a commit
to symfony/dependency-injection
that referenced
this pull request
Apr 13, 2017
…las-grekas) This PR was squashed before being merged into the 3.3-dev branch (closes #22420). Discussion ---------- [DI] Make tagged abstract services throw earlier | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As spotted by @stof in symfony/symfony#22388 (comment), skipping abstract tagged services removes an opportunity to report config mistakes to users. Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr). I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic. To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags. Commits ------- 388e4b3389 [DI] Make tagged abstract services throw earlier cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
symfony-splitter
pushed a commit
to symfony/form
that referenced
this pull request
Apr 13, 2017
…las-grekas) This PR was squashed before being merged into the 3.3-dev branch (closes #22420). Discussion ---------- [DI] Make tagged abstract services throw earlier | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As spotted by @stof in symfony/symfony#22388 (comment), skipping abstract tagged services removes an opportunity to report config mistakes to users. Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr). I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic. To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags. Commits ------- 388e4b3389 [DI] Make tagged abstract services throw earlier cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Apr 13, 2017
…las-grekas) This PR was squashed before being merged into the 3.3-dev branch (closes #22420). Discussion ---------- [DI] Make tagged abstract services throw earlier | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As spotted by @stof in symfony/symfony#22388 (comment), skipping abstract tagged services removes an opportunity to report config mistakes to users. Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr). I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic. To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags. Commits ------- 388e4b3389 [DI] Make tagged abstract services throw earlier cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not a bug fix on a lower branch because this does not work right now: refs to abstract services are caught by CheckDefinitionValidityPass.
But with "instanceof" & other new 3.3 features, we're going to use abstract services more extensively, thus we need this now.