Deprecation: #101174 - InformationStatus class

See forge#101174

Description

The class \TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus has been marked as deprecated in favour of the new nativ enum \TYPO3\CMS\Backend\Toolbar\InformationStatus.

Additionally, passing a string as $status to either addSystemInformation() or addSystemMessage() of class \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem has been deprecated as well. An instance of the new enum has to be provided.

Impact

Usage of the class \TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus, its constants or methods will trigger a PHP E_USER_DEPRECATED error. The class will be removed in TYPO3 v14.0.

Passing a string as $status to either addSystemInformation() or addSystemMessage() of class \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem will trigger a PHP E_USER_DEPRECATED error.

Affected installations

All installations using the class \TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus directly or passing a string as $status to either addSystemInformation() or addSystemMessage() of class \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem.

The extension scanner will report any usage of the deprecated class as strong match.

Migration

// Before
$status = \TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus::cast(
    \TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus::STATUS_INFO
);
$statusString = (string)$status;


// After
$status = \TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus::INFO;
$statusString = $status->value;
Copied!