PHPackages                             cpsit/typo3-config-loader - 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. cpsit/typo3-config-loader

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

cpsit/typo3-config-loader
=========================

A loader for various TYPO3-related configuration, including system configuration and configuration for third-party extensions.

1.3.0(2mo ago)58.6k—6.3%1[1 issues](https://github.com/CPS-IT/typo3-config-loader/issues)GPL-3.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Apr 24Pushed 1mo ago5 watchersCompare

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

READMEChangelog (6)Dependencies (14)Versions (11)Used By (0)

TYPO3 config loader
===================

[](#typo3-config-loader)

[![Coverage](https://camo.githubusercontent.com/15bd793f0fba8edb524d4620f58542d8e982001222bcb6d87a19e3edf3ece674/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c73436f7665726167652f6769746875622f4350532d49542f7479706f332d636f6e6669672d6c6f616465723f6c6f676f3d636f766572616c6c73)](https://coveralls.io/github/CPS-IT/typo3-config-loader)[![CGL](https://camo.githubusercontent.com/19eea8325654a8317c11d14d339243d349a63301a1efbe7f340f690c1fb0d754/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4350532d49542f7479706f332d636f6e6669672d6c6f616465722f63676c2e79616d6c3f6c6162656c3d63676c266c6f676f3d676974687562)](https://github.com/CPS-IT/typo3-config-loader/actions/workflows/cgl.yaml)[![Tests](https://camo.githubusercontent.com/489c08f948bd0e8ea6f37fbd9b46c084ab3e431fc60e4ffee57bee5d78bfb6d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4350532d49542f7479706f332d636f6e6669672d6c6f616465722f74657374732e79616d6c3f6c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/CPS-IT/typo3-config-loader/actions/workflows/tests.yaml)[![TYPO3 support](https://camo.githubusercontent.com/95cc4f0858d5a857a31041dc6f0a35b47ff2b10bdfe96f6c67f3827314d8a37f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31325f2532365f31332d6f72616e67653f6c6f676f3d7479706f33)](https://get.typo3.org/)

📦 [Packagist](https://packagist.org/packages/cpsit/typo3-config-loader) | 💾 [Repository](https://github.com/CPS-IT/typo3-config-loader) | 🐛 [Issue tracker](https://github.com/CPS-IT/typo3-config-loader/issues)

A loader for various TYPO3-related configuration, including system configuration and configuration for third-party extensions. Based on the [`helhum/config-loader`](https://github.com/helhum/config-loader)library.

🚀 Features
----------

[](#-features)

- Config loader for [system configuration](src/Loader/SystemConfigurationLoader.php)
- Config loader for [EXT:solr](src/Loader/SolrConfigurationLoader.php)
- Compatible with TYPO3 12.4 LTS, 13.4 LTS and 14.1

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

[](#-installation)

[![Packagist](https://camo.githubusercontent.com/911a435bf03be3738304b4792769daa82bd3f3372ed17da13cf4f503895d6df1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63707369742f7479706f332d636f6e6669672d6c6f616465723f6c6162656c3d76657273696f6e266c6f676f3d7061636b6167697374)](https://packagist.org/packages/cpsit/typo3-config-loader)[![Packagist Downloads](https://camo.githubusercontent.com/f649b0af966b314a30fe7290a092f4d66827bab4bbcc36288ad4488c89eb592b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63707369742f7479706f332d636f6e6669672d6c6f616465723f636f6c6f723d627269676874677265656e)](https://packagist.org/packages/cpsit/typo3-config-loader)

```
composer require cpsit/typo3-config-loader
```

⚡ Usage
-------

[](#-usage)

Tip

Read more about loader-specific configuration in the appropriate class documentation.

### Basic (non-cached)

[](#basic-non-cached)

Add the following code snippet to your project's `config/system/additional.php` file:

```
$systemConfigLoader = new CPSIT\Typo3ConfigLoader\Loader\SystemConfigurationLoader();
$systemConfigLoader->load();
```

In case your project uses EXT:solr, you can load its configuration as well:

```
$solrConfigLoader = new CPSIT\Typo3ConfigLoader\Loader\SolrConfigurationLoader();
$solrConfigLoader->load();
```

### Cached

[](#cached)

You can also use a cached version of the appropriate loaders:

```
$systemConfigLoader = new CPSIT\Typo3ConfigLoader\Loader\SystemConfigurationLoader();
$systemConfigLoader->loadCached();
```

🔍 System configuration readers
------------------------------

[](#-system-configuration-readers)

### 1. Context specific reader

[](#1-context-specific-reader)

The [`Helhum\ConfigLoader\Reader\PhpFileReader`](https://github.com/helhum/config-loader/blob/main/src/Reader/PhpFileReader.php) receives lowest priority when loading system configuration. It resolves system configuration from a context-specific file path within the `app/config/environment` directory. The default directory path can be overwritten with an environment variable `CONTEXT_CONFIGURATION_PATH`. Each file must return an array with additional system configuration values.

**Example:**

- TYPO3 context: `Development/Local`
- File path: `app/config/environment/Development/Local.php`

**File contents:**

```
# /var/www/html/app/config/environment/Development/Local.php

return [
    'SYS' => [
        'debug' => 1,
    ],
];
```

### 2. Environment file reader

[](#2-environment-file-reader)

The next reader in the priority chain for system configuration is the [`Helhum\ConfigLoader\Reader\YamlFileReader`](https://github.com/helhum/config-loader/blob/main/src/Reader/YamlFileReader.php). It reads additional configuration from a configured YAML file. The file path must be specified as environment variable `ENV_FILE_PATH`. If the variable is not present, this reader is skipped.

**Example:**

- Environment variable: `ENV_FILE_PATH=/var/www/html/env.yml`
- File path: `/var/www/html/env.yml`

**File:**

```
# /var/www/html/env.yml

SYS:
  debug: 1
```

### 3. Environment variables reader

[](#3-environment-variables-reader)

The [`Helhum\ConfigLoader\Reader\EnvironmentReader`](https://github.com/helhum/config-loader/blob/main/src/Reader/EnvironmentReader.php) receives highest priority. It is used to map environment variables to configuration values. Environment variables must be prefixed by `TYPO3` and each configuration key must be separated by `__`(two underscore characters).

**Example:**

- Environment variable: `TYPO3__MAIL__transport_smtp_server`
- Configuration path: `$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server']`

💡 Custom loaders
----------------

[](#-custom-loaders)

In case this library does not fulfill all your requirements, you are free to extend it by your needs. A [`ConfigurationLoader`](src/Loader/ConfigurationLoader.php)interface exists which can be used to provide additional loaders. Additionally, you are free to make use of the [`EnvironmentCreator`](src/EnvironmentCreator.php) trait which allows the transformation of loaded configuration to environment variables.

Next to the `ConfigurationLoader` there exists an extended interface that is able to cache and load cached data. Use [`CacheableConfigurationLoader`](src/Loader/CacheableConfigurationLoader.php) and implement the additional method `loadCached` to make use of cached configuration.

Consider contributing to this project if you feel like some functionality is missing or not yet fully covered.

🚧 Migration
-----------

[](#-migration)

### 0.4.x/0.5.x → 1.x

[](#04x05x--1x)

- **Removal of environment variables reader compatibility layer**
    - Default key separator was changed from `_` (one underscore) to `__` (two underscores).
    - Support for feature flag environment variable `TYPO3_CONFIG_LOADER_USE_SAFE_SEPARATOR`was removed.
    - Make sure to convert existing environment variables to make use of the changed key separator, e.g. `TYPO3_SYS_debug` → `TYPO3__SYS__debug`.
- **Renaming of shipped configuration loader class names**
    - Both shipped configuration loaders were renamed from `` to `ConfigurationLoader`, e.g. [`System`](https://github.com/CPS-IT/typo3-config-loader/blob/5e516082108bce67adcf4b5b20e344725a3764f5/src/Loader/System.php) → [`SystemConfigurationLoader`](src/Loader/SystemConfigurationLoader.php).
    - Change references to the renamed classes and make sure to adapt the class names as described.
- **Hardening of configuration loader classes**
    - Both shipped configuration loaders are now marked as `final readonly`.
    - Custom configuration loaders may no longer extended default configuration loaders.
    - Change your custom implementations to a direct implementation of the [`ConfigurationLoader`](src/Loader/ConfigurationLoader.php) or [`CacheableConfigurationLoader`](src/Loader/CacheableConfigurationLoader.php) interfaces.

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

[](#‍-contributing)

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

⭐ License
---------

[](#-license)

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

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 55.7% 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 ~51 days

Total

7

Last Release

85d ago

Major Versions

0.4.x-dev → 1.2.02025-11-26

PHP version history (3 changes)1.0.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

0.4.1PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

1.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)

![](https://www.gravatar.com/avatar/a664c83f7a6760600d2a325f751b2a206f686b3dcb2f1dce5655ead343dc5a24?d=identicon)[cps](/maintainers/cps)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (54 commits)")[![eliashaeussler](https://avatars.githubusercontent.com/u/16313625?v=4)](https://github.com/eliashaeussler "eliashaeussler (40 commits)")[![konradmichalik](https://avatars.githubusercontent.com/u/4558190?v=4)](https://github.com/konradmichalik "konradmichalik (3 commits)")

---

Tags

configconfig-loadertypo3

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cpsit-typo3-config-loader/health.svg)

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

###  Alternatives

[helhum/typo3-config-handling

Simple but powerful configuration handling for TYPO3 CMS

37307.8k4](/packages/helhum-typo3-config-handling)[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)
