Skip to content

Disable PrivateServiceRule when the class implements ServiceSubscriberInterface #19

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

Closed
wants to merge 1 commit into from

Conversation

iamluc
Copy link
Contributor

@iamluc iamluc commented Nov 9, 2018

I have a lot of violations Service "X" is private. when extending the AbstractController which implements the ServiceSubscriberInterface.

When implementing this interface, the service receive a special container with the services listed by the method getSubscribedServices.

I think the PrivateServiceRule should be disabled in this case.

(For details: https://symfony.com/doc/current/service_container/service_subscribers_locators.html)

@iamluc iamluc force-pushed the detect-service-subscriber branch 3 times, most recently from b7dfe8d to efe3010 Compare November 9, 2018 17:07
@iamluc iamluc force-pushed the detect-service-subscriber branch from efe3010 to ecefe2d Compare November 9, 2018 17:25
@lookyman
Copy link
Collaborator

Merged as c340de8, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants