Issue Task Closed

#103628Avoid deprecation notice in SystemInformationToolbarItem->addSystemInformation()

Kevin Appelt 04/14/24, 20:28 updated 07/09/24, 15:38

Description

TYPO3 Deprecation Notice: Using a string of the non-native enumeration TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus for $status in SystemInformationToolbarItem->addSystemInformation() has been deprecated and will stop working in TYPO3 v14.0. Use the native TYPO3\CMS\Backend\Toolbar\InformationStatus instead.

This is caused by:
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/scheduler/Classes/SystemInformation/ToolbarItemProvider.php#L84
So if the scheduler was NOT started manually (but f.e. by a cronjob) the value passed for $severity is an empty string.

We can mitigate the issue by setting $severity by default to InformationStatus::NOTICE which is the default for SystemInformationToolbarItem->addSystemInformation()

This only effects TYPO3 v13/main.

Reviews 1