Project

General

Profile

Actions

Feature #99081

open

Implement ServiceSubscriberInterface

Added by Stefan Froemken about 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Start date:
2022-11-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
8.1
Tags:
Complexity:
Sprint Focus:

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

Actions #1

Updated by Chris Müller about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Benni Mack over 1 year ago

  • Target version changed from 12 LTS to Candidate for Major Version
Actions

Also available in: Atom PDF