---
title: "Feature: #101396 - Let Extbase handle native enums"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-101396-1689843367"
source: "Changelog/13.0/Feature-101396-LetExtbaseHandleNativeEnums.rst"
typo3-version: "13.0"
typo3-major: 13
type: "feature"
issue: 101396
forge: "https://forge.typo3.org/issues/101396"
tags: ["PHP-API", "ext:extbase"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Feature: #101396 - Let Extbase handle native enums {#feature-101396-1689843367}

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

## Description {#description}

With PHP 8.1, native support for [enums](https://www.php.net/manual/en/language.types.enumerations.php) has been introduced. This is quite handy
if a database field has a specific set of values which can be represented by a
PHP enum.

It is now possible to use backed enums in entities like this:

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Domain\Model\Enum;

enum Level: string
{
    case INFO = 'info';
    case ERROR = 'error';
}
```

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Domain\Model;

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

class LogEntry extends AbstractEntity
{
    protected Enum\Level $level;
}
```

## Impact {#impact}

To implement enums, it is no longer necessary to extend the now deprecated TYPO3
Core class `\TYPO3\CMS\Core\Type\Enumeration`.
