---
title: "Deprecation: #107648 - InfoboxViewHelper STATE_* constants"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-107648-1744465200"
source: "Changelog/14.0/Deprecation-107648-InfoboxViewHelperStateConstants.rst"
typo3-version: "14.0"
typo3-major: 14
type: "deprecation"
issue: 107648
forge: "https://forge.typo3.org/issues/107648"
tags: ["Fluid", "FullyScanned", "ext:fluid"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Deprecation: #107648 - InfoboxViewHelper STATE\_\* constants {#deprecation-107648-1744465200}

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

## Description {#description}

The public constants in
`\TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper` for defining
the state or severity of an infobox have been deprecated:

-   `InfoboxViewHelper::STATE_NOTICE`
-   `InfoboxViewHelper::STATE_INFO`
-   `InfoboxViewHelper::STATE_OK`
-   `InfoboxViewHelper::STATE_WARNING`
-   `InfoboxViewHelper::STATE_ERROR`

These constants have been superseded by the dedicated enum
`\TYPO3\CMS\Core\Type\ContextualFeedbackSeverity`, which provides a
single source of truth for severity levels across the entire TYPO3 Core
and improves type safety and maintainability.

## Impact {#impact}

Using these constants will trigger a PHP deprecation warning. The
constants will be removed in TYPO3 v15.0. The extension scanner will
report usages as **weak** match.

## Affected installations {#affected-installations}

Instances using any of the `STATE_*` constants from
`InfoboxViewHelper` in their PHP
code or Fluid templates.

## Migration {#migration}

Replace the deprecated constants with the corresponding
`ContextualFeedbackSeverity` enum.

> [!IMPORTANT]
> Whenever possible, use the enum directly instead of extracting its
> integer value. This provides better type safety and makes the code
> more expressive. Only use `->value` when you explicitly need
> the integer representation.

**Example (PHP)**

```php
// Before
use TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper;
$state = InfoboxViewHelper::STATE_ERROR;

// After - Recommended: Use the enum directly
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
$severity = ContextualFeedbackSeverity::ERROR;

// Alternative: Use the integer value when explicitly needed
$stateValue = ContextualFeedbackSeverity::ERROR->value;
```

In Fluid templates, use the enum via `f:constant()`:

**Example (Fluid Template)**

```html
<!-- Before -->
<f:be.infobox
    title="Error!"
    state="{f:constant(name: 'TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper::STATE_ERROR')}">
    Error message
</f:be.infobox>

<!-- After -->
<f:be.infobox
    title="Error!"
    state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::ERROR')}">
    Error message
</f:be.infobox>
```

The `InfoboxViewHelper` has been
updated to accept both the enum directly and integer values for backward
compatibility.

### Mapping table {#mapping-table}

| Deprecated constant | Replacement | Value |
| --- | --- | --- |
| `InfoboxViewHelper::STATE_NOTICE` | `ContextualFeedbackSeverity::NOTICE->value` | -2 |
| `InfoboxViewHelper::STATE_INFO` | `ContextualFeedbackSeverity::INFO->value` | -1 |
| `InfoboxViewHelper::STATE_OK` | `ContextualFeedbackSeverity::OK->value` | 0 |
| `InfoboxViewHelper::STATE_WARNING` | `ContextualFeedbackSeverity::WARNING->value` | 1 |
| `InfoboxViewHelper::STATE_ERROR` | `ContextualFeedbackSeverity::ERROR->value` | 2 |
