-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Fix handling of repeated #[Autoconfigure]
attributes
#57298
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
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.
I think there is a regression for tags, before they were all added and now only the last are configured.
src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php
Outdated
Show resolved
Hide resolved
3917ac7
to
58f7e4b
Compare
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.
SGTM
58f7e4b
to
e3e38ce
Compare
#[Autoconfigure]
on a service#[Autoconfigure]
attributes
e3e38ce
to
e9de5a0
Compare
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.
The fix was much simpler ;)
I pushed it and kept your test cases.
Thank you @alexandre-daubois. |
I'll have a look at your solution. Thank you for taking care of this! |
When repeating
#[Autoconfigure]
, arguments from all attributes are now used. If an option is defined multiple times in repeated attributes, the last attribute defined will sets value.