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

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

moselwal/typo3-config
=====================

Fluent API to set environment-specific configuration for TYPO3.

v5.5.0(1mo ago)00MITPHPPHP ^8.5

Since Jun 6Pushed 1mo agoCompare

[ Source](https://github.com/Moselwal-Digitalagentur/typo3-config)[ Packagist](https://packagist.org/packages/moselwal/typo3-config)[ Docs](https://moselwal.de)[ RSS](/packages/moselwal-typo3-config/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (9)Versions (5)Used By (0)

TYPO3 Config — Fluent Configuration Library
===========================================

[](#typo3-config--fluent-configuration-library)

[![TYPO3 14](https://camo.githubusercontent.com/8f02675f3749751be8f38b62ba260ffb937ee6fad6c4b7ab3a1e704af48fea2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31342e782d6f72616e67652e737667)](https://get.typo3.org/)[![PHP 8.2+](https://camo.githubusercontent.com/0f16581d1180dbfd4c0e13166ec1267d4ad2f2fab8281ea6d6b284cf5c65d921/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c75652e737667)](https://php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Fluent PHP API for environment-specific TYPO3 configuration. Provides context-based presets, secure secret management, caching, logging, mailer setup, and TLS/mTLS auto-configuration.

Features
--------

[](#features)

- **Context-Based Presets** — Auto-configuration for Production, Development, CLI, and Testing environments
- **Secret Resolution Cascade** — Secure secret loading from `_FILE` env vars → `/run/secrets/` → `getenv()` → fallback
- **Caching Auto-Configuration** — Redis/Valkey (via `moselwal/keyvalue-store`), APCu, or file backends
- **TLS/mTLS Auto-Configuration** — Automatic certificate discovery for database and Redis connections
- **Mailer Setup** — SMTP and Mailpit configuration helpers
- **Logging Presets** — Context-aware logging configuration
- **Image Engine** — ImageMagick and GraphicsMagick configuration
- **Fluent Interface** — Chainable API for readable configuration
- **TYPO3 14.x** — getestet auf der aktuellen LTS-Linie

Installation
------------

[](#installation)

```
composer require moselwal/typo3-config
```text

## Quick Start

In your `config/config.php`:

```php
loadCoreSecrets()
    ->loadMailSecrets()
    ->autoconfigureCaching();
```

Secret Management
-----------------

[](#secret-management)

Secrets are resolved through a cascading lookup:

1. File path from env var (`DB_PASSWORD_FILE`)
2. Default secret file (`/run/secrets/db_password`)
3. Direct env var (`getenv('DB_PASSWORD')`)
4. Fallback parameter (optional)

```
# Docker secrets or Kubernetes mounts
echo "supersecret" > /run/secrets/db_password
```text

```php
Config::get()->loadCoreSecrets();
```

No secrets need to be committed to Git or stored in `.env` files.

Available Presets
-----------------

[](#available-presets)

MethodDescription`applyDefaults()`Auto-selects preset based on TYPO3 context`useCliPreset()`Optimized for CLI calls with debug output`useDevelopmentPreset()`Development environment settings`useProductionPreset()`Production with APP\_ROOT (container)`useProductionPresetVHost()`Production with VHost-based setupUsage Example
-------------

[](#usage-example)

```
Config::get()
    ->useGraphicsMagick()
    ->useMailpit()
    ->autoconfigureCaching()
    ->setPhpSettings([
        'memory_limit' => '512M',
        'max_execution_time' => 120,
    ])
    ->setConfigPathValues('SYS', [
        'defaultScheme' => 'https',
    ]);
```text

## TYPO3 Version Compatibility

| TYPO3 Version | Status |
|---------------|--------|
| v11 | Supported |
| v12 | Supported (`pagesection` cache auto-removed) |
| v13 | Supported (`imagesizes` cache auto-removed) |
| v14 | Supported |

## Architecture
```

src/ ├── Config.php # Main class (Singleton, Fluent API) └── ConfigInterface.php # Public contract interface tests/ ├── ConfigTestCase.php # Base test class (singleton reset, $GLOBALS isolation) ├── TestableConfig.php # Test subclass for version injection └── ... # 35+ tests with &gt;120 assertions

```

- **Singleton pattern** via `Config::initialize()` / `Config::get()`
- **Namespace**: `Moselwal\` → `src/` (PSR-4)
- Late static binding (`new static()`) for project-specific extensions

## Development

```bash
composer install
composer test              # PHPUnit tests
composer test:coverage     # Tests with coverage report
composer phpstan           # PHPStan Level 5 static analysis

```

Dependencies
------------

[](#dependencies)

PackageTypePurpose`moselwal/keyvalue-store`OptionalRedis/Valkey cache and session backends`moselwal/dev`DevShared QA toolingRelated
-------

[](#related)

- [keyvalue-store](../keyvalue-store) — Redis/Valkey integration used by the caching auto-configuration

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) for details.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

4

Last Release

47d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e0a48f51d9fddd2b5104df8997e3281935968f4895d7c0392e719ecb916ccea?d=identicon)[o.hartwig](/maintainers/o.hartwig)

---

Top Contributors

[![ohartwig](https://avatars.githubusercontent.com/u/4158815?v=4)](https://github.com/ohartwig "ohartwig (65 commits)")

---

Tags

configurationenvironmentdotenvtypo312factor

### Embed Badge

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

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

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k57](/packages/friendsoftypo3-content-blocks)[typo3/cms-styleguide

TYPO3 extension to showcase TYPO3 Backend capabilities

106760.3k34](/packages/typo3-cms-styleguide)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[jweiland/events2

Events 2 - Create single and recurring events

2166.7k3](/packages/jweiland-events2)[in2code/lux

Living User eXperience - LUX - the Marketing Automation tool for TYPO3.

2158.6k1](/packages/in2code-lux)

PHPackages © 2026

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