maispace / environment
This extension provides environment depended helper functions for setting up TYPO3
Package info
github.com/mai-space-de/typo3-extension-environment
Type:typo3-cms-extension
pkg:composer/maispace/environment
Requires
- typo3/cms-core: ^13.0
Requires (Dev)
- armin/editorconfig-cli: ^2.1
- friendsofphp/php-cs-fixer: ^3.0
- helmich/typo3-typoscript-lint: ^3.1
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.0
- saschaegerer/phpstan-typo3: ^2.0
- typo3/testing-framework: ^8.0
This package is auto-updated.
Last update: 2026-03-08 16:21:31 UTC
README
This extension provides environment-dependent helper functions for setting up TYPO3. It allows you to easily manage different configurations for development, testing, and production environments, including support for DDEV.
Features
- Environment-based configuration presets.
- DDEV environment detection and automatic configuration.
- Easy inclusion of context-dependent configuration files.
- Helpers for common TYPO3 settings (database, caching, logging, etc.).
Installation
composer require maispace/environment
Usage
In your public/index.php (or wherever you initialize your environment), you can use the ConfigProvider:
use Maispace\Environment\ConfigProvider\ConfigProvider; ConfigProvider::initialize();
Or with custom defaults:
ConfigProvider::initialize(false) ->useDevelopmentPreset() ->applyDefaults();
Available Methods
The ConfigProvider implements ConfigProviderTraitInterface, which provides many useful methods:
appendContextToSiteName(): Appends the application context (e.g., [Development]) to the site name.useDDEVConfiguration(): Automatically configures database and other settings for DDEV.useProductionPreset()/useDevelopmentPreset(): Applies common settings for production or development.initializeDatabaseConnection(): Set up database connection.initializeRedisCaching(): Set up Redis caching.includeContextDependentConfigurationFiles(): Includes files fromconfig/system/additional/<Context>.php.
License
GPL-2.0-or-later