-
Notifications
You must be signed in to change notification settings - Fork 92
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
Support #[AutowireLocator]
#411
Comments
The current workaround is to use Looking at https://github.com/phpstan/phpstan-symfony/blob/1ef4dce2baabd464c2dd3109d051bad94efa1e79/src/Rules/Symfony/ContainerInterfacePrivateServiceRule.php and #151 it shouldn't be very hard to implement a fix, unfortunately I currently don't have time for that. |
I just implemented support for the basic syntax as described in the OP ( |
I actually took the time and implemented AutowireLocator attribute support in #420 |
I have the same problem, but instead of defining specific services, I use a tag instead, so the container contains all services with this tag. This is also allowed by Symfony and the services don't have to be public to access them this way through this limited container. Could you consider this kind of usage too when fixing the issue? Thanks a lot!
|
Symfony 6.4 introduced an attribute called
#[AutowireLocator]
which automatically creates and injects aServiceLocator
into a service. Looks like a similar feature was already implemented with #151.Is it possible to add support for this feature, too?
The text was updated successfully, but these errors were encountered: