Issue Feature Rejected

#99081Implement ServiceSubscriberInterface

Stefan Froemken 11/14/22, 12:29 updated 04/11/25, 10:47

Description

Hello Core-Team,

Symfony offers the possibility to just load the classes you really need. The system is called service subscriber and locator. In most cases this system is used for ActionControllers, but can be used everywhere you want:

https://symfony.com/doc/current/service_container/service_subscribers_locators.html

Symfony comes with 2 Compiler Passes to resolve and register such services. Further, classes implementing the ServiceSubscriberInterface will automatically tagged with “container.service_subscriber” in

https://github.com/symfony/framework-bundle/blob/9e177f72d1d58fd3a8ca839f91b4239632435bac/DependencyInjection/FrameworkExtension.php#L577-L578

Currently each extension author has to adopt this technique for each of its extensions himself. Maybe TYPO3 could add this symfony tag and apply these CompilerPass to simplify the use of this symfony feature.

Stefan

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.