Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[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 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
#[AutowireLocator]#[AutowireLocator]
kbond left a comment
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 toTaggedLocator - not sure we want to document this until we deprecate that attribute?
Additionally, when passing an array of services, you can useSubscribedService's in order to add other DI attributes.
Uh oh!
There was an error while loading.Please reload this page.
#[AutowireLocator]#[AutowireLocator]OskarStark commentedOct 6, 2023 • 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.
I don't get it 😄 Can you add an example or provide a PR? Thanks |
#[AutowireLocator]#[AutowireLocator] and add#[AutowireIterator]OskarStark commentedOct 6, 2023
SubscribedService added |
kbond commentedOct 9, 2023
A bit contrived but here's an example:https://github.com/symfony/symfony/blob/3147082e35faadd873a801a4011bc8cbb79807e0/src/Symfony/Component/DependencyInjection/Tests/Fixtures/AutowireLocatorConsumer.php#L26 |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
06ec120 tod173ca7CompareUh oh!
There was an error while loading.Please reload this page.
OskarStark commentedOct 10, 2023
Ready to merge from my side |
…`#[AutowireIterator]`
4dbc867 to528cbdaCompare
Uh oh!
There was an error while loading.Please reload this page.
cc@kbond
Waiting code merge
#[AutowireIterator]attribute and improve#[AutowireLocator]symfony#51832Fixes#18997