[BUGFIX] Allow ViewHelpers from libraries
With TYPO3 11 it was possible to use ViewHelpers from composer libraries that aren't TYPO3 extensions and thus don't use Symfony dependency injection. With the removal of objectManager, this doesn't work anymore in TYPO3 12 because the dependency injection can only instantiate ViewHelper classes that are defined as public services explicitly. This change reintroduces that functionality by falling back to "new" if the class exists but isn't registered as a service. Fluid standalone uses the same method to instantiate a ViewHelper. Resolves: #100785 Releases: main, 12.4 Change-Id: I495e006fa15eb815fb3734b4c73361821869f4ad Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78917 Tested-by:Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com>
Showing
- composer.json 2 additions, 1 deletioncomposer.json
- typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperResolver.php 7 additions, 2 deletions...sext/fluid/Classes/Core/ViewHelper/ViewHelperResolver.php
- typo3/sysext/fluid/Configuration/Services.yaml 0 additions, 83 deletionstypo3/sysext/fluid/Configuration/Services.yaml
- typo3/sysext/fluid/Tests/Functional/Fixtures/Libraries/viewhelper_library/composer.json 11 additions, 0 deletions...ional/Fixtures/Libraries/viewhelper_library/composer.json
- typo3/sysext/fluid/Tests/Functional/Fixtures/Libraries/viewhelper_library/src/ViewHelpers/TestViewHelper.php 35 additions, 0 deletions...ies/viewhelper_library/src/ViewHelpers/TestViewHelper.php
- typo3/sysext/fluid/Tests/Functional/ViewhelperLibraryTest.php 42 additions, 0 deletions...3/sysext/fluid/Tests/Functional/ViewhelperLibraryTest.php
Please register or sign in to comment