Deprecation: #97531 - Context-related methods within TypoScriptFrontendController
See forge#97531
Description
One of the main classes within TYPO3 Frontend —
Typo
a.k.a.
$GLOBALS
—
had various short-hand functionality to access the Context API.
This is mainly for historical reasons, before the Context API was introduced in TYPO3 v9.
For this reason, the related methods have been marked as deprecated:
init
User Groups () is
User Or Group Set () is
Backend User Logged In () do
Workspace Preview () which
Workspace ()
Impact
Calling the methods directly will trigger a PHP
E_
error.
Affected Installations
TYPO3 installations with custom extensions using one of the methods. The extension scanner will report any usage as weak match.
Migration
Migrate towards the Context API instead:
// Is this request within a Workspace currently
$context->getPropertyFromAspect('workspace', 'isOffline', false);
// Is a frontend user logged in
$context->getPropertyFromAspect('frontend.user', 'isLoggedIn', false);
Copied!