twoh/twoh_base 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

TYPO3 13 PHP 8.2+ License: GPL v2

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 .env support for TYPO3's AdditionalConfiguration.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

  1. Download the extension
  2. Upload to typo3conf/ext/twoh_base
  3. 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

💖 Support This Project

If you find this extension helpful, please consider supporting its development! Your sponsorship helps maintain and improve this project.

Sponsor on GitHub

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-06-09