Breaking: #97816 - New TypoScript parser in Frontend

See forge#97816

Description

The rewrite of the TypoScript parser has been enabled for Frontend rendering.

See Breaking: #97816 - TypoScript syntax changes and Feature: #97816 - TypoScript syntax improvements for more details on the new parser.

Impact

The change has impact on Frontend caching, hooks, some classes and properties. In detail:

  • Hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Core/TypoScript/TemplateService']['runThroughTemplatesPostProcessing'] is gone and substituted by AfterTemplatesHaveBeenDeterminedEvent. See Feature: #97816 - New AfterTemplatesHaveBeenDeterminedEvent for more details.

  • The classes TYPO3\CMS\Core\TypoScript\TemplateService and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser have been marked as deprecated and shouldn't be used anymore. An instance of TemplateService is still kept as property TypoScriptFrontendController->tmpl ($GLOBALS['TSFE']->tmpl) as backwards compatible layer, and the most important properties within the class, namely especially :php:`TemplateService->setup is still set. To avoid using these properties, the Frontend request object will contain this state. In rare cases, where extensions need to parse TypoScript on their own, they should switch to the Tokenizer and AstBuilder structures of the new parser. Note these classes are still young and currently marked @internal, the API may still slightly change with further v12 development.

  • The pagesection cache has been removed. This was a helper cache that grew O(n) with the number of called Frontend pages. The new typoscript cache is used instead: This grows only O(n) with the number of different sys_template and condition combinations and is a filesystem based PhpFrontend implementation. When upgrading, the database tables cache_pagesection and cache_pagesections_tags can be safely removed, the install tool will also silently remove any existing entries from settings.php that reconfigure the cache.

  • The following properties and methods in TypoScriptFrontendController have been set to @internal and should not be used any longer since they may vanish without further notice:

    • TypoScriptFrontendController->no_cache

    • TypoScriptFrontendController->tmpl

    • TypoScriptFrontendController->pageContentWasLoadedFromCache

    • TypoScriptFrontendController->getFromCache_queryRow()

    • TypoScriptFrontendController->populatePageDataFromCache()

    • TypoScriptFrontendController->shouldAcquireCacheData()

    • TypoScriptFrontendController->acquireLock()

    • TypoScriptFrontendController->releaseLock()

  • The following methods in TypoScriptFrontendController have been removed:

    • TypoScriptFrontendController->getHash()

    • TypoScriptFrontendController->getLockHash()

    • TypoScriptFrontendController->getConfigArray()

    • TypoScriptFrontendController->()

Affected installations

Many instances will only recognize that the pagesection cache is gone and should continue to work. Instances with extensions that use TemplateService or TypoScriptParser, or access the property TypoScriptFrontendController->tmpl may need adaptions.

Migration

See the impact description above for some migration hints.