twoh/twoh_base
最新稳定版本:1.0.5
Composer 安装命令:
composer require twoh/twoh_base
包简介
This extension allows you to move the TYPO3 context into separate files instead of working with the `AdditionalConfiguration.php`.
README 文档
README
This extension allows you to move the TYPO3 context into separate files instead of working with the
AdditionalConfiguration.php.
📋 Features
- Context-based Configuration – Organize TYPO3 settings per environment (Development, Production, etc.)
- Environment Variables Support – Includes
.envsupport for TYPO3'sAdditionalConfiguration.php - Clean Project Setup – Provides all needed files for setting up a TYPO3 project
⚙️ Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.2 |
| Composer | ^2.0 |
| TYPO3 | ^13.4 |
🚀 Installation
Via Composer (recommended)
composer require twoh/twoh_base
Manual Installation
- Download the extension
- Upload to
typo3conf/ext/twoh_base - Activate in TYPO3 Extension Manager
📖 Usage
Configuration Structure
Create a config/ directory in your project root with environment-specific configuration files:
project-root/
├── config/
│ ├── default.php # Base configuration (loaded first)
│ ├── development.php # Development environment
│ ├── production.php # Production environment
│ └── production.staging.php # Production/Staging context
Example Configuration File
<?php // config/default.php return [ 'DB' => [ 'Connections' => [ 'Default' => [ 'host' => 'localhost', 'dbname' => 'typo3', ], ], ], ];
Loading Configuration
Add to your AdditionalConfiguration.php:
<?php use TWOH\TwohBase\Configuration\Loader; use TYPO3\CMS\Core\Core\Environment; $loader = new Loader( Environment::getContext(), Environment::getProjectPath() ); $loader->load();
🧪 Development
Running Tests
composer test:unit
Code Style
# Check code style composer cs:check # Fix code style composer cs:fix
📄 License
This project is licensed under the GPL-2.0-or-later License – see the LICENSE file for details.
👥 Authors
- Andreas Reichel – a.reichel91@outlook.com
- Igor Smertin – igor.smertin@web.de
💖 Support This Project
If you find this extension helpful, please consider supporting its development! Your sponsorship helps maintain and improve this project.
Become a Sponsor – Every contribution helps us dedicate more time to building great TYPO3 extensions and keeping them up-to-date!
🔗 Links
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-06-09