-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fix ServiceLocator indexing when service is decorated #42347
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
I don't recall why I did that. I guess it was necessary for my original implementation and it might very well be the case that the final implementation did not need the passes to be rearranged anymore. As long as the tests are green, I'm fine with the change. |
Thank you @shyim. |
After the change I've got a lot of |
src/Symfony/Component/DependencyInjection/Tests/Compiler/ServiceLocatorTagPassTest.php
Show resolved
Hide resolved
This PR was merged into the 5.4 branch. Discussion ---------- [DependencyInjection] Fix undefined class in test | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | #42347 (comment) | License | MIT | Doc PR | - Commits ------- 949c304 [DI] Fix undefined class in test
We save in our application the service id into the database to look up the service by a tagged locator (finding the service which handles the payment).
With Symfony 5.3 the keys are differed when the service is decorated, this breaks our application logic.
The problem has been introduced with the addition of autowired arguments. The Pass order has been changed (91fbc90#diff-b75bcd1c8a876c4e6f189c298e7c7133d1d3bc87e2a2876c40ab92a51df1093aR68)
Now the
ServiceLocatorTagPass
runs after the decoration magic has been done.This PR moves the DecoratorServicePass back to the place where it was on 5.2 and previous versions