Open
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 the symfony/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)