Deprecation: #88792 - forceTemplateParsing in TSFE and TemplateService

See Issue #88792

Description

  • TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::forceTemplateParsing and
  • TYPO3\CMS\Core\TypoScript\TemplateService::forceTemplateParsing

have been marked as deprecated and replaced by Context API.

Impact

Setting either forceTemplateParsing of TypoScriptFrontendController or TemplateService will trigger a PHP E_USER_DEPRECATED error.

Affected Installations

All installations setting or reading $TSFE->forceTemplateParsing or TemplateService->forceTemplateParsing.

Migration

Use the Context API

GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('typoscript', 'forcedTemplateParsing');
$context->setAspect('typoscript', GeneralUtility::makeInstance(TypoScriptAspect::class, true));