PHPackages                             eliashaeussler/typo3-config-objects - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. eliashaeussler/typo3-config-objects

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eliashaeussler/typo3-config-objects
===================================

Provides value objects for strictly typed TYPO3 configuration

0.2.1(1mo ago)40[1 issues](https://github.com/eliashaeussler/typo3-config-objects/issues)GPL-2.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Apr 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/eliashaeussler/typo3-config-objects)[ Packagist](https://packagist.org/packages/eliashaeussler/typo3-config-objects)[ RSS](/packages/eliashaeussler-typo3-config-objects/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (26)Versions (5)Used By (0)

Value objects for strictly typed TYPO3 configuration
====================================================

[](#value-objects-for-strictly-typed-typo3-configuration)

[![Coverage](https://camo.githubusercontent.com/90130770fda40174edfbb3aa3c5ad337256dbed5503eaf6fb8a1e90a6efd0b50/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c73436f7665726167652f6769746875622f656c6961736861657573736c65722f7479706f332d636f6e6669672d6f626a656374733f6c6f676f3d636f766572616c6c73)](https://coveralls.io/github/eliashaeussler/typo3-config-objects)[![CGL](https://camo.githubusercontent.com/784a0f56140f174142e39936e965b4271f38082c8db4717b91b14fbebebf548f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656c6961736861657573736c65722f7479706f332d636f6e6669672d6f626a656374732f63676c2e79616d6c3f6c6162656c3d63676c266c6f676f3d676974687562)](https://github.com/eliashaeussler/typo3-config-objects/actions/workflows/cgl.yaml)[![Tests](https://camo.githubusercontent.com/58c10d0020b39db5b6536473e6b00ef1ffd9e18cb3dfcd04d631b69a3d762c0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656c6961736861657573736c65722f7479706f332d636f6e6669672d6f626a656374732f74657374732e79616d6c3f6c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/eliashaeussler/typo3-config-objects/actions/workflows/tests.yaml)[![Supported PHP Versions](https://camo.githubusercontent.com/e0c2c67c97c8607c532b123971e0a935ecb05d069151da0086c552d1b90fdc3e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f656c6961736861657573736c65722f7479706f332d636f6e6669672d6f626a656374732f7068703f6c6f676f3d706870)](https://packagist.org/packages/eliashaeussler/typo3-config-objects)

This library provides custom value objects for strictly typed [TYPO3](https://typo3.org/) configuration. They can be used to replace the usage of arrays in configuration files, such as `Confguration/Icons.php`.

🔥 Installation
--------------

[](#-installation)

[![Packagist](https://camo.githubusercontent.com/0e4db40701011255c86bc156d20df203208be7c4baf5eb9c9e0dcf7c95103da5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6961736861657573736c65722f7479706f332d636f6e6669672d6f626a656374733f6c6162656c3d76657273696f6e266c6f676f3d7061636b6167697374)](https://packagist.org/packages/eliashaeussler/typo3-config-objects)[![Packagist Downloads](https://camo.githubusercontent.com/ecf964d184087117b38d9bc6be0f7054ad292716bcd8d65ce77e9737e809c3ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6961736861657573736c65722f7479706f332d636f6e6669672d6f626a656374733f636f6c6f723d627269676874677265656e)](https://packagist.org/packages/eliashaeussler/typo3-config-objects)

```
composer require eliashaeussler/typo3-config-objects
```

⚡ Usage
-------

[](#-usage)

It's pretty easy: Replace arrays in your configuration files with value objects 💅. The following configuration classes are available:

- [`IconConfiguration`](#iconconfiguration-for-configurationiconsphp)
- [`MiddlewareConfiguration`](#middlewareconfiguration-for-configurationrequestmiddlewaresphp)

### [`IconConfiguration`](src/Configuration/IconConfiguration.php) (for `Configuration/Icons.php`)

[](#iconconfiguration-for-configurationiconsphp)

**Before:**

```
// Configuration/Icons.php

use TYPO3\CMS\Core;

return [
    'tx-example-my-icon' => [
        'provider' => Core\Imaging\IconProvider\SvgIconProvider::class,
        'source' => 'EXT:example/Resources/Public/Icons/my-icon.svg',
    ],
    'tx-example-my-second-icon' => [
        'provider' => Core\Imaging\IconProvider\BitmapIconProvider::class,
        'source' => 'EXT:example/Resources/Public/Icons/my-second-icon.jpg',
    ],
    'tx-example-my-legacy-icon' => [
        'provider' => Core\Imaging\IconProvider\SvgIconProvider::class,
        'source' => 'EXT:example/Resources/Public/Icons/my-legacy-icon.svg',
        'deprecated' => [
            'since' =>  'TYPO3 v12',
            'until' => 'TYPO3 v13',
            'replacement' => 'tx-example-my-new-icon',
        ],
    ],
    'tx-example-my-new-icon' => [
        'provider' => \Vendor\Example\Imaging\MyCustomIconProvider::class,
        'renderer' => \Vendor\Example\Renderer\MyCustomIconRenderer::class,
    ],
];
```

**After:**

```
// Configuration/Icons.php

use EliasHaeussler\Typo3ConfigObjects;

return Typo3ConfigObjects\Configuration\IconConfiguration::create()
    // Add a list of icons to configure
    ->add(
        Typo3ConfigObjects\ValueObject\Icon::create('tx-example-my-icon')
            ->useSvgIconProvider('EXT:example/Resources/Public/Icons/my-icon.svg'),
        Typo3ConfigObjects\ValueObject\Icon::create('tx-example-my-second-icon')
            ->useBitmapIconProvider('EXT:example/Resources/Public/Icons/my-second-icon.jpg')
    )

    // You can also use deprecated icons
    ->add(
        Typo3ConfigObjects\ValueObject\Icon::create('tx-example-my-legacy-icon')
            ->useSvgIconProvider('EXT:example/Resources/Public/Icons/my-legacy-icon.svg')
            ->setDeprecated(
                new Typo3ConfigObjects\ValueObject\DeprecatedIcon(
                    since: 'TYPO3 v12',
                    until: 'TYPO3 v13',
                    replacement: 'tx-example-my-new-icon',
                ),
            )
    )

    // You can also use custom icon providers and custom options
    ->add(
        Typo3ConfigObjects\ValueObject\Icon::create('tx-example-my-new-icon')
            ->useCustomIconProvider(\Vendor\Example\Imaging\MyCustomIconProvider::class)
            ->addOption('renderer', \Vendor\Example\Renderer\MyCustomIconRenderer::class)
    )

    // Don't forget to return an array representation (TYPO3 expects an array to be returned)
    ->toArray();
```

### [`MiddlewareConfiguration`](src/Configuration/MiddlewareConfiguration.php) (for `Configuration/RequestMiddlewares.php`)

[](#middlewareconfiguration-for-configurationrequestmiddlewaresphp)

**Before:**

```
// Configuration/RequestMiddlewares.php

use TYPO3\CMS\Core;

return [
    'backend' => [
        'vendor/extension/my-middleware' => [
            'target' => \Vendor\Example\Middleware\MyMiddleware::class,
        ],
        'vendor/extension/my-other-middleware' => [
            'target' => \Vendor\Example\Middleware\MyOtherMiddleware::class,
            'before' => [
                'vendor/extension/my-middleware',
            ],
            'after' => [
                'typo3/cms-backend/authentication',
            ],
        ],
    ],
    'frontend' => [
        'typo3/cms-redirects/redirecthandler' => [
            'disabled' => true,
        ],
    ],
];
```

**After:**

```
// Configuration/RequestMiddlewares.php

use EliasHaeussler\Typo3ConfigObjects;

return Typo3ConfigObjects\Configuration\MiddlewareConfiguration::create()
    // Add a list of middlewares
    ->addToBackendStack(
        Typo3ConfigObjects\ValueObject\RequestMiddleware::create('vendor/extension/my-middleware')
            ->setTarget(\Vendor\Example\Middleware\MyMiddleware::class),
        Typo3ConfigObjects\ValueObject\RequestMiddleware::create('vendor/extension/my-other-middleware')
            ->setTarget(\Vendor\Example\Middleware\MyOtherMiddleware::class)
            ->before('vendor/extension/my-middleware')
            ->after('typo3/cms-backend/authentication')
    )

    // You can also disable existing middlewares
    ->addToFrontendStack(
        Typo3ConfigObjects\ValueObject\RequestMiddleware::create('typo3/cms-redirects/redirecthandler')
            ->disable()
    )

    // Don't forget to return an array representation (TYPO3 expects an array to be returned)
    ->toArray();
```

🧑‍💻 Contributing
----------------

[](#‍-contributing)

Please have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md).

⭐ License
---------

[](#-license)

This project is licensed under [GNU General Public License 2.0 (or later)](LICENSE).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance87

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~174 days

Total

3

Last Release

40d ago

PHP version history (2 changes)0.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

0.2.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/144cefe55242b883c87cb537463f3ba75a0f8198fc5b602b50c838aae31fe7ee?d=identicon)[eliashaeussler](/maintainers/eliashaeussler)

---

Top Contributors

[![eliashaeussler](https://avatars.githubusercontent.com/u/16313625?v=4)](https://github.com/eliashaeussler "eliashaeussler (25 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (11 commits)")

---

Tags

configtypo3value-object

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eliashaeussler-typo3-config-objects/health.svg)

```
[![Health](https://phpackages.com/badges/eliashaeussler-typo3-config-objects/health.svg)](https://phpackages.com/packages/eliashaeussler-typo3-config-objects)
```

###  Alternatives

[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1481.0k](/packages/eliashaeussler-typo3-form-consent)[b13/assetcollector

Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10118.4k](/packages/b13-assetcollector)[mfd/ai-filemetadata

Automatically generates FAL metadata for files by means of public LLMs

1142.1k](/packages/mfd-ai-filemetadata)[mautic/mautic-typo3

Add-on TYPO3 extension that enhances the "EXT:marketing\_automation" TYPO3 extension by connecting it to the Mautic Marketing Automation platform: Determine "Persona" from Mautic segments. Also provides additional services e.g. language synchronisation between Mautic and TYPO3.

236.3k](/packages/mautic-mautic-typo3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
