Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Fix autowiring tagged arguments from attributes#43579
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedOct 19, 2021
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
6a33b9b tob064ccaComparenicolas-grekas commentedOct 20, 2021
Thanks for the PR, I think moving attributes resolution from Yet I see three issues that should be fixed to me:
I think all 3 issues can be solved by patching |
okhoshi commentedOct 20, 2021
Thanks for the comments ! Is it possible to target 5.3 since the When you say that you would hardcode the attributes in the As a side note, I had to change the behavior of |
nicolas-grekas commentedOct 20, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
We need to fix this issue in 5.3, and I don't have a better idea.
Yes, I didn't full grasp this part but I'll review more carefully after the rest is fixed :) |
okhoshi commentedOct 20, 2021
@nicolas-grekas I pushed a rework of the branch. It works with the IntegrationTest, but it breaks some tests on the side, mainly because the I'll fix the other tests tomorrow. Also, I noticed that#43386 has been merged on 5.4 only and it's modifying the tags, so conflicts will arise :(. |
src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
9aa90b8 to55a39c0Compare
nicolas-grekas left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
While reviewing more carefully, I found that patchingAttributeAutoconfigurationPass would not work well with autowiring of@required methods, or with named arguments, etc.
Instead, I pushed a new pass that is dedicated to autowiring tagged arguments from attributes. This pass runs afterAutowireRequired*Pass and beforeServiceLocatorTagPass, thus fixing all concerns.
42ca1ca tob2783a7Comparenicolas-grekas commentedOct 22, 2021
I figured out an even simpler patch, PR updated. |
nicolas-grekas commentedOct 26, 2021
Thank you@okhoshi. |
Uh oh!
There was an error while loading.Please reload this page.
Reimplement#40406 with
AttributeAutoconfigurationPassto avoid the BC following the change inCompilerPassordering inPassConfig.Also revert the various fix made in an attempt to recover the BC introduced by#40406.
Note:5.4branch was needed becauseAttributeAutoconfigurationPassis not handling parameters in 5.3To-do: