-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
TraceableVoter seems to retain tags from inner service #29550
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
Labels
Comments
Confirmed. diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php
index 31104fb..d547c3e 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php
@@ -51,12 +51,12 @@ class PassConfig
$this->optimizationPasses = array(array(
new ResolveChildDefinitionsPass(),
new ServiceLocatorTagPass(),
+ new RegisterServiceSubscribersPass(),
new DecoratorServicePass(),
new ResolveParameterPlaceHoldersPass(false),
new ResolveFactoryClassPass(),
new FactoryReturnTypePass($resolveClassPass),
new CheckDefinitionValidityPass(),
- new RegisterServiceSubscribersPass(),
new ResolveNamedArgumentsPass(),
new AutowireRequiredMethodsPass(),
new ResolveBindingsPass(), Could you please try it and confirm everything keeps working? |
Thanks @chalasr - your fixed worked. I opened a PR |
nicolas-grekas
added a commit
that referenced
this issue
Dec 12, 2018
…ervicePass (kbond) This PR was merged into the 3.4 branch. Discussion ---------- [DI] move RegisterServiceSubscribersPass before DecoratorServicePass | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no| Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #29550 | License | MIT | Doc PR | n/a From #29550 (comment): The fact that `RegisterServiceSubscribersPass` runs after `DecoratorServicePass` makes it impossible to decorate a service implementing `ServiceSubscriberInterface` if the decorator does not implement it. Commits ------- c3271d9 [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.2.0
Description
I have a voter that implements
ServiceSubscriberInterface
. When clearing the cache I get the following error:How to reproduce
Create a auto-configured voter that implements
ServiceSubscriberInterface
and clear the cache in dev.Possible Solution
Not a solution but if I remove this bit of code from
AddSecurityVoter
, it works as expected.Additional context
Possibly related to #29385?
Looks to have been introduced in #27914.
The text was updated successfully, but these errors were encountered: