[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>
Showing
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php 17 additions, 7 deletionstypo3/sysext/backend/Classes/Template/ModuleTemplate.php
- typo3/sysext/backend/Configuration/Services.php 11 additions, 0 deletionstypo3/sysext/backend/Configuration/Services.php
- typo3/sysext/backend/Configuration/Services.yaml 4 additions, 0 deletionstypo3/sysext/backend/Configuration/Services.yaml
- typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php 56 additions, 7 deletionstypo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php
- typo3/sysext/core/Classes/Http/Dispatcher.php 13 additions, 2 deletionstypo3/sysext/core/Classes/Http/Dispatcher.php
- typo3/sysext/info/Classes/Controller/InfoModuleController.php 35 additions, 10 deletions...3/sysext/info/Classes/Controller/InfoModuleController.php
- typo3/sysext/info/Configuration/Services.yaml 3 additions, 0 deletionstypo3/sysext/info/Configuration/Services.yaml
Please register or sign in to comment