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
[DI] New container.service_subscriber & ServiceSubscriberInterface #7740
Comments
@weaverryan This is a whole concept (built on top of #7458) allowing to request some entries from the DIC at the PHP level. I think it deserves its own article, the need for this feature should be different that the one for #7458 (right now the class must know which services they want exactly, #7458 is more about collecting tagged services). @nicolas-grekas pov would be good! |
It's like event listeners vs subscribers. |
I agree and it's already the case for events, that doesn't make listeners useless though. But creating locators by hand remain the way to go for collecting services for a given tag, that is especially useful for third party libs/bundles and the core. Opened symfony/symfony#22649 for a related proposal. |
I've created a concept page in #9223. It still needs some improvements though, especially properly describing |
See symfony/symfony#21708
The text was updated successfully, but these errors were encountered: