PHPackages                             mteu/typo3-typed-extconf - 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. mteu/typo3-typed-extconf

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

mteu/typo3-typed-extconf
========================

Typed Extension Configuration - Aims to provide a type-safe extension configuration management for TYPO3, ensuring proper types instead of string-only values from backend configuration or mixed types from config/system/settings.php

1.1.2(2mo ago)555.4k↓27.2%2[3 PRs](https://github.com/mteu/typo3-typed-extconf/pulls)3GPL-2.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Jul 23Pushed 1mo agoCompare

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

READMEChangelog (10)Dependencies (12)Versions (34)Used By (3)

[![CGL](https://github.com/mteu/typo3-typed-extconf/actions/workflows/cgl.yaml/badge.svg)](https://github.com/mteu/typo3-typed-extconf/actions/workflows/cgl.yaml)[![Tests](https://github.com/mteu/typo3-typed-extconf/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/mteu/typo3-typed-extconf/actions/workflows/tests.yaml)[![Coverage](https://camo.githubusercontent.com/d4fd588d898be213417cac46359d58af7500129690e4ece8038b3049fbb49e0d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d7465752f7479706f332d74797065642d657874636f6e662f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/mteu/typo3-typed-extconf?branch=main)[![Maintainability](https://camo.githubusercontent.com/2d668724f51e886f24eb5f4275ab0708667f38f11408f186ed6bd40a484abc1a/68747470733a2f2f716c74792e73682f67682f6d7465752f70726f6a656374732f7479706f332d74797065642d657874636f6e662f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/mteu/projects/typo3-typed-extconf)

[![Extension Icon](Resources/Public/Icons/Extension.svg)](Resources/Public/Icons/Extension.svg)TYPO3 Typed Extension Configuration
===================================

[](#typo3-typed-extension-configuration)

[![TYPO3 versions](https://camo.githubusercontent.com/18454cd3cf69e9627b37dd235125aa34e35b6f8bd84d32ede789d6a4f44591ce/68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f74797065645f657874636f6e662f7479706f332f736869656c64732e737667)](https://camo.githubusercontent.com/18454cd3cf69e9627b37dd235125aa34e35b6f8bd84d32ede789d6a4f44591ce/68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f74797065645f657874636f6e662f7479706f332f736869656c64732e737667)[![Latest version](https://camo.githubusercontent.com/04ed907d52bac5465c6fa16e9774206f30a13f06577c09e0bb6f5d166377417c/68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f74797065645f657874636f6e662f76657273696f6e2f736869656c64732e737667)](https://camo.githubusercontent.com/04ed907d52bac5465c6fa16e9774206f30a13f06577c09e0bb6f5d166377417c/68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f74797065645f657874636f6e662f76657273696f6e2f736869656c64732e737667)[![Stability](https://camo.githubusercontent.com/7a0f0583b868f15d400085e1f310182444b8414ed7996aa48bf12e5590f6345b/68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f74797065645f657874636f6e662f73746162696c6974792f736869656c64732e737667)](https://camo.githubusercontent.com/7a0f0583b868f15d400085e1f310182444b8414ed7996aa48bf12e5590f6345b/68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f74797065645f657874636f6e662f73746162696c6974792f736869656c64732e737667)[![PHP Version Require](https://camo.githubusercontent.com/ea2da4c431c1e36c9a949a4cc758967b6fa4a2b83d460d79cc0a784f26937dc7/68747470733a2f2f706f7365722e707567782e6f72672f6d7465752f7479706f332d74797065642d657874636f6e662f726571756972652f706870)](https://packagist.org/packages/mteu/typo3-typed-extconf)

This TYPO3 CMS extension aims to provide a type-safe extension configuration management for TYPO3, ensuring proper types instead of string-only values from backend configuration or mixed types from `config/system/settings.php|additional.php`(or custom solutions around those).

🦊 TYPO3 Support
---------------

[](#-typo3-support)

TYPO3 v12TYPO3 v13TYPO3 v14up to v0.3✅✅❌v1.x❌✅✅🚀 Features
----------

[](#-features)

- **Type Safety**: Automatic conversion from TYPO3's string configuration to proper PHP types
- **Schema Definition**: Define configuration using PHP attributes and constructor parameters
- **Path Mapping**: Support for nested configuration with dot notation (`api.endpoint`)
- **Configuration Generation**: Generate classes from `ext_conf_template.txt` or interactively
- **Dependency Injection**: Configuration classes auto-registered as services

⚡️ Installation
---------------

[](#️-installation)

Add this package to your TYPO3 Extension:

```
composer require mteu/typo3-typed-extconf
```

This extension relies heavily on these key dependencies:

- [`cuyz/valinor`](https://github.com/CuyZ/Valinor) for type-safe object mapping and validation
- [`nette/phpgenerator`](https://github.com/nette/php-generator) for PHP code generation for configuration classes
- [`symfony/console`](https://github.com/symfony/console) for the automated (or interactive) code generation

💡 Usage
-------

[](#-usage)

Tip

For a comprehensive developer guide with advanced examples and best practices, check out the [Developer Guide](Documentation/developer-guide.md).

Note

If you're in a hurry, you might want to have this package generate configuration classes automatically based on your extension's `ext_conf_template.txt`.

Run `./vendor/bin/typo3 typed-extconf:generate` or consult the [Command Guide](Documentation/command-guide.md).

Use with caution, though, since this functionality is not well tested, yet.

### 1. Define Configuration Schema

[](#1-define-configuration-schema)

Create a configuration class for your extension using PHP attributes:

```
