-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[DependencyInjection] Update syntax for #[AutowireLocator]
and add #[AutowireIterator]
#18993
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
[DependencyInjection] Update syntax for #[AutowireLocator]
and add #[AutowireIterator]
#18993
Conversation
#[AutowireLocator]
#[AutowireLocator]
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.
This attribute now behaves identically to TaggedLocator
- not sure we want to document this until we deprecate that attribute?
Additionally, when passing an array of services, you can use SubscribedService
's in order to add other DI attributes.
#[AutowireLocator]
#[AutowireLocator]
I don't get it 😄 Can you add an example or provide a PR? Thanks |
#[AutowireLocator]
#[AutowireLocator]
and add #[AutowireIterator]
SubscribedService added |
A bit contrived but here's an example: https://github.com/symfony/symfony/blob/3147082e35faadd873a801a4011bc8cbb79807e0/src/Symfony/Component/DependencyInjection/Tests/Fixtures/AutowireLocatorConsumer.php#L26 |
06ec120
to
d173ca7
Compare
Ready to merge from my side |
…`#[AutowireIterator]`
4dbc867
to
528cbda
Compare
cc @kbond
Waiting code merge
#[AutowireIterator]
attribute and improve#[AutowireLocator]
symfony#51832Fixes #18997