Open Akhristenko opened 10 months ago
Reading the description of the original code PR (https://github.com/symfony/symfony/pull/40800) I think that the docs tell exactly the same as that original description.
Why do you say that the code can't work as explained in docs? Thanks.
Documentation says: Another possibility is to use the #[Target] attribute. By using this attribute on the argument you want to autowire, you can define exactly which service to inject by using its alias. According to this documentation and having the following code
i define alias for service in services
and try to inject it via
#[Target]
attributebut this don't work. After viewing the source code, I realized that this should not work. I think this line in the documentation is misleading.