[TASK] Avoid ObjectManager in ext:fluid RenderingContext
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 8 Jun 2021 10:00:00 +0000 (12:00 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 9 Jun 2021 16:05:07 +0000 (18:05 +0200)
commit04d844fc241dad4f55986f89393d0fca5c71b0d1
treeb5505dd778b80c1dcc8b2091fda8c44de03cc966
parent3fd3342dcb2dc1ad21edcff934281f71df4d53ed
[TASK] Avoid ObjectManager in ext:fluid RenderingContext

RenderingContext is a good case for a class that creates
"arbitrary" objects: The PreProcessor class names are
retrieved from global configuration in order to be
instantiated.

This initialization is moved into a (install tool mode
compatible) factory in order to transform ObjectManager
into a fallback layer for PreProcessors that are
not defined in the newer PSR container.
Therefore $container->has() is used prior to $container->get(),
in order to fallback to ObjectManager for objects that can't be
retrieved – due to missing configuration – via ContainerInterface yet.

Resolves: #94285
Related: #90803
Releases: master
Change-Id: I3fd1751b8580de7c8307e9b84da38e1551c2c622
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69412
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extbase/Configuration/Services.yaml
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextFactory.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ServiceProvider.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
typo3/sysext/fluid/Classes/View/StandaloneView.php
typo3/sysext/fluid/Configuration/Services.yaml
typo3/sysext/fluid/composer.json