-
Benni Mack authored
This change registers all possible cObjects for frontend rendering via Services.yaml and allows for ContentObjects to use dependency injection. This way, we do not have to juggle with global objects anymore as a factory is used that makes use of a tagged_locator [1] to retrieve prototypes from the dependency injection container, making it very straight forward to fetch the respective object for cObjects like 'TEXT' from the locator. [1] A tagged_locator is a straight-forward way for very simple registries that use lazy loading and only need one tag identifier, to be implemented without having to combine tags and the registry via a designated compiler pass. It makes use of the so called service locator pattern and uses Symfony\Component\DependencyInjection\ServiceLocator under the hood in order to provide a PSR-11 ContainerInterface object limited to the tagged services. https://symfony.com/doc/5.4/service_container/service_subscribers_locators.html#indexing-the-collection-of-services Resolves: #96659 Related: #64386 Releases: main Change-Id: I7e8ebd95da9e059682e4e61066c6f2caf35c3d82 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73013 Tested-by: Benjamin Franzke <bfr@qbus.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Benjamin Franzke <bfr@qbus.de> Reviewed-by: Oliver Bartsch <bo@cedev.de> Reviewed-by: Benni Mack <benni@typo3.org>
3cc9e6a6