Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Open
Labels
Milestone
Description
In#19819 we added the description of the new#[AutowireMethodOf]
attribute.
The new content is correct, but I think it's missing useful tips and contents included in thesymfony/symfony#54016 discussion:
- When/why use this instead of injecting the dependency directly? ([DependencyInjection] Add
#[AutowireMethodOf]
attribute to autowire a method of a service as a callable symfony#54016 (comment)) - This supposedly simplifies tests a lot ([DependencyInjection] Add
#[AutowireMethodOf]
attribute to autowire a method of a service as a callable symfony#54016 (comment)) but I'd like to see a real test example because I don't fully understand this. - Maybe also include this factory example?[DependencyInjection] Add
#[AutowireMethodOf]
attribute to autowire a method of a service as a callable symfony#54016 (comment)