Deprecation: #99020 - Deprecate TypoScript/TemplateService
See forge#99020
Description
The class
\TYPO3\ has been marked as deprecated
in TYPO3 v12 and will be removed in v13. This class is sometimes indirectly accessed
using
Typo or
$GLOBALS.
Impact
The class
Template is part of the old TypoScript parser and has been
substituted with a new parser approach.
Actively calling class methods will trigger a deprecation log level warning.
Affected installations
Instances with extensions directly using
Template or indirectly
using it by calling
Typo or
$GLOBALS are affected.
Migration
The class
Template is typically called in TYPO3 frontend scope. Extensions
should avoid using
Typo and
$GLOBALS
methods and properties. They can retrieve TypoScript from the PSR-7 request instead
using the attribute frontend.typoscript.
As example, the full frontend TypoScript can be retrieved like this:
$fullTypoScript = $request()->getAttribute('frontend.typoscript')->getSetupArray();