[!!!][TASK] Use new TypoScript parser in Frontend
This switches from TemplateService to new TypoScript parser logic in TypoScriptFrontendController. The central methods getFromcache() and getConfigArray() were called in PrepareTypoScriptFrontendRendering after each other: getConfigArray() is now merged into getFromcache() directly. One main goal is to get rid of the 'pagesection' cache and leverage the new cache strategy of the new TypoScript parser: This cache strategy is more effective and allows caching TypoScript between different pages. We essentially get rid of the pagesection query load, but instead need the list of relevant sys_template rows early, which is done with a single query. This code is moved out of IncludeTree/TreeBuilder to new class IncludeTree/SysTemplateRepository, since the result is now needed to build page cache identifiers and thus must be exposed. An event is added as well, for extensions like ext:bolt to manipulate sys_template rows resolving. The old runThroughTemplatesPostProcessing hook is marked @internal now and will vanish during further v12 development when testing-framework has been changed to deal with it. The central getFromcache() is much better documented and should be far easier to understand now. Some parts of the code are currently a bit naive and there is quite a bit potential to further optimize parsetime especially in "full cached" scenarios. We also have the potential to make USER_INT parsing significantly quicker. Dedicated patches will follow with continued v12 development. The patch also sets a couple of properties to @internal, and marks the old TypoScriptParser and TemplateService @deprecated, even though it is currently still used for instance for TSconfig parsing, which will switch to the new parser soon as well. Resolves: #98503 Related: #97816 Releases: main Change-Id: I904e9add4a425479df4a6768a1d63a54d7b252d8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75944 Tested-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 1 addition, 1 deletiontypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/Event/AfterTemplatesHaveBeenDeterminedEvent.php 55 additions, 0 deletions...cludeTree/Event/AfterTemplatesHaveBeenDeterminedEvent.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateRepository.php 199 additions, 0 deletions.../Classes/TypoScript/IncludeTree/SysTemplateRepository.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/TreeBuilder.php 29 additions, 170 deletions...ysext/core/Classes/TypoScript/IncludeTree/TreeBuilder.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php 12 additions, 0 deletions...ncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php
- typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php 4 additions, 1 deletion...ysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
- typo3/sysext/core/Classes/TypoScript/TemplateService.php 12 additions, 79 deletionstypo3/sysext/core/Classes/TypoScript/TemplateService.php
- typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php 13 additions, 9 deletions...ysext/core/Classes/Utility/ExtensionManagementUtility.php
- typo3/sysext/core/Configuration/DefaultConfiguration.php 0 additions, 9 deletionstypo3/sysext/core/Configuration/DefaultConfiguration.php
- typo3/sysext/core/Configuration/Services.yaml 8 additions, 5 deletionstypo3/sysext/core/Configuration/Services.yaml
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97816-NewTypoScriptParserInFrontend.rst 77 additions, 0 deletions...log/12.0/Breaking-97816-NewTypoScriptParserInFrontend.rst
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-97816-NewAfterTemplatesHaveBeenDeterminedEvent.rst 33 additions, 0 deletions...eature-97816-NewAfterTemplatesHaveBeenDeterminedEvent.rst
- typo3/sysext/core/Tests/Functional/TypoScript/IncludeTree/SysTemplateRepositoryTest.php 95 additions, 0 deletions...onal/TypoScript/IncludeTree/SysTemplateRepositoryTest.php
- typo3/sysext/core/Tests/Functional/TypoScript/IncludeTree/TreeBuilderTest.php 36 additions, 9 deletions...sts/Functional/TypoScript/IncludeTree/TreeBuilderTest.php
- typo3/sysext/form/Tests/Functional/RequestHandling/AbstractRequestHandlingTest.php 0 additions, 4 deletions...unctional/RequestHandling/AbstractRequestHandlingTest.php
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 420 additions, 214 deletions...ntend/Classes/Controller/TypoScriptFrontendController.php
- typo3/sysext/frontend/Classes/Http/RequestHandler.php 1 addition, 1 deletiontypo3/sysext/frontend/Classes/Http/RequestHandler.php
- typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php 7 additions, 19 deletions...Classes/Middleware/PrepareTypoScriptFrontendRendering.php
- typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php 5 additions, 10 deletions...d/Classes/Middleware/TypoScriptFrontendInitialization.php
- typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php 10 additions, 0 deletions...ests/Unit/Controller/TypoScriptFrontendControllerTest.php
Please register or sign in to comment