Deprecation: #100405 - Property TypoScriptFrontendController->type 

See forge#100405

Description 

The public property type of the main class in TYPO3 frontend \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController has been marked as internal, as it should not be used outside of this PHP class anymore in the future.

This is part of the overall part to reduce dependencies on this PHP class, as it is not always available in TYPO3 frontend.

Impact 

Accessing this property will trigger a PHP deprecation notice. Accessing this property might also happen via TypoScript and TypoScript conditions.

Affected installations 

TYPO3 installations using this property on checking various typeNum settings from TypoScript.

Migration 

When using this property in PHP code via $GLOBALS['TSFE']->type , it is recommended to move to the PSR-7 request via $request->getAttribute('routing')->getPageType(), which is the property of the PageArguments object, as a result of the GET parameter type, or $GLOBALS['TSFE']->getPageArguments()->getPageType() if the request object is not available.

Within TypoScript, conditions and getData properties need to be adapted:

# Before
[getTSFE() && getTSFE().type == 13]

# After
[request.getPageArguments()?.getPageType() == 13]
Copied!

In TypoScript getData attributes:

# Before
page.10.data = TSFE:type

# After
page.10.data = request:routing|pageType
Copied!