[TASK] Hook up ContainerInterface in backend route dispatcher 46/61246/4
authorBenjamin Franzke <bfr@qbus.de>
Thu, 4 Jul 2019 18:10:52 +0000 (20:10 +0200)
committerBenni Mack <benni@typo3.org>
Sat, 13 Jul 2019 17:34:32 +0000 (19:34 +0200)
commit98f415c66a5b9c2654a214cbe2be554e29baae57
tree4d81ad87d3dc413d5ddc2fca78a3ddb51ff83587
parentf8c6150c7750492c7d1c84f3a984136340457c5d
[TASK] Hook up ContainerInterface in backend route dispatcher

Transform InfoModuleController and it's dependency ModuleTemplate
into a symfony manageed services  to retrieve dependencies from
symfony instead of GeneralUtility::makeInstance.
ModuleTemplate is a prototype and is therefore marked shared: false.
It is marked public: true so legacy calls to
GeneralUtility::makeInstance(ModuleTemplate::class) resort to the
container and properly inject dependencies.

Also add a backend.controller symfony tag, to be universally
applied for backend controllers. This tag automatically configures
the controller to be publicly available from $container->get()
which allows the route dispatcher to lazily instantiate
the controller.

Releases: master
Resolves: #88721
Change-Id: I076c306736243e693542f2774dbe1108e28fe731
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61246
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Jörg Bösche <typo3@joergboesche.de>
Tested-by: Steffen Frese <steffenf14@gmail.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Steffen Frese <steffenf14@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Template/ModuleTemplate.php
typo3/sysext/backend/Configuration/Services.php [new file with mode: 0644]
typo3/sysext/backend/Configuration/Services.yaml
typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php
typo3/sysext/core/Classes/Http/Dispatcher.php
typo3/sysext/info/Classes/Controller/InfoModuleController.php
typo3/sysext/info/Configuration/Services.yaml