Deprecation: #97787 - Severities of flash messages and reports deprecated

See forge#97787

Description

With the introduction of \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity, the existing severity constants of \TYPO3\CMS\Core\Messaging\FlashMessage and \TYPO3\CMS\Reports\Status have been marked as deprecated.

Impact

Passing the constants as listed below to the constructor of \TYPO3\CMS\Core\Messaging\FlashMessage will trigger a PHP E_USER_DEPRECATED error:

  • \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE

  • \TYPO3\CMS\Core\Messaging\FlashMessage::INFO

  • \TYPO3\CMS\Core\Messaging\FlashMessage::OK

  • \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING

  • \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR

Passing the constants as listed below to the constructor of \TYPO3\CMS\Reports\Status will trigger a PHP E_USER_DEPRECATED error:

  • \TYPO3\CMS\Reports\Status::NOTICE

  • \TYPO3\CMS\Reports\Status::INFO

  • \TYPO3\CMS\Reports\Status::OK

  • \TYPO3\CMS\Reports\Status::WARNING

  • \TYPO3\CMS\Reports\Status::ERROR

Affected installations

All installations with 3rd party plugins using the aforementioned constants are affected.

Migration

Use the cases of the \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity enum. The following cases are available:

  • \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::NOTICE

  • \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO

  • \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::OK

  • \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING

  • \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::ERROR