---
title: "Feature: #97787 - Enum for severities introduced"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-97787-1655495723"
source: "Changelog/12.0/Feature-97787-EnumForSeveritiesIntroduced.rst"
typo3-version: "12.0"
typo3-major: 12
type: "feature"
issue: 97787
forge: "https://forge.typo3.org/issues/97787"
tags: ["PHP-API", "ext:core"]
rendered: "2026-10-01T16:39:42+00:00"
---

# Feature: #97787 - Enum for severities introduced {#feature-97787-1655495723}

See [forge#97787](https://forge.typo3.org/issues/97787)

## Description {#description}

The PHP enum `\TYPO3\CMS\Core\Type\ContextualFeedbackSeverity` has been
introduced, allowing streamlined usage of severities across the codebase. At the
time of writing, this affects flash messages and status reports used in
EXT:reports.

## Impact {#impact}

The enum cases in `\TYPO3\CMS\Core\Type\ContextualFeedbackSeverity` are
meant to be a drop-in replacement for the severity constants of
`\TYPO3\CMS\Core\Messaging\FlashMessage` and `\TYPO3\CMS\Reports\Status`.

## Example {#example}

Example of using the enum in a flash message:

```php
$flashMessage = GeneralUtility::makeInstance(
    \TYPO3\CMS\Core\Messaging\FlashMessage::class,
    'Flash message text',
    'This is fine',
    \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::OK
);
```

Example of using the enum in a status report:

```php
$statusReport = GeneralUtility::makeInstance(
    \TYPO3\CMS\Reports\Status::class,
    'Lemming-o-meter',
    'Oops',
    'Not all lemmings were saved!',
    \TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING
);
```
