---
title: "Feature: #97559 - Support property-based configuration for Extbase attributes"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-97559-1760451913"
source: "Changelog/14.0/Feature-97559-UsePropertiesForConfigurationOfExtbaseAttributes.rst"
typo3-version: "14.0"
typo3-major: 14
type: "feature"
issue: 97559
forge: "https://forge.typo3.org/issues/97559"
tags: ["PHP-API", "ext:extbase"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Feature: #97559 - Support property-based configuration for Extbase attributes {#feature-97559-1760451913}

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

## Description {#description}

PHP attributes in the Extbase context can now be configured using properties
instead of an array of configuration values. This resolves a limitation that
existed since the introduction of Extbase annotations in TYPO3 v9, where
annotation configuration was restricted: all available options needed to be
defined in a single array.

Since annotations were removed with [forge#107229](https://forge.typo3.org/issues/107229) in favor of PHP attributes,
configuration options can now be defined in a more flexible and type-safe way.

### Example usage {#example-usage}

```php
use TYPO3\CMS\Extbase\Attribute\FileUpload;
use TYPO3\CMS\Extbase\Attribute\Validate;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;

class MyModel extends AbstractEntity
{
    #[Validate(validator: 'NotEmpty')]
    protected string $foo = '';

    #[FileUpload(
        validation: [
            'required' => true,
            'maxFiles' => 1,
            'fileSize' => ['minimum' => '0K', 'maximum' => '2M'],
            'allowedMimeTypes' => ['image/jpeg', 'image/png'],
        ],
        uploadFolder: '1:/user_upload/files/',
    )]
    protected ?FileReference $bar = null;
}
```

## Impact {#impact}

This patch serves as a follow-up to [forge#107229](https://forge.typo3.org/issues/107229) and aims to improve the
attribute configuration mechanism by using constructor property promotion in
combination with strictly typed properties.

To maintain backwards compatibility, the first property of each attribute still
accepts an array of configuration options. However, this behavior is deprecated
and will be removed in TYPO3 v15.0 (see
[deprecation notice](https://docs.typo3.org/permalink/changelog:deprecation-97559-1760453281)).

Developers are advised to migrate to single-property configuration when using
PHP attributes in Extbase.
