An open API service indexing awesome lists of open source software.

https://github.com/twohreichel/twoh_base

This extension allows you to move the TYPO3 context into separate files instead of working with the AdditionalConfiguration.php.
https://github.com/twohreichel/twoh_base

backend easy php8 typo3 typo3-cms-extension typo3-extension typoscript webdevelopment

Last synced: 2 months ago
JSON representation

This extension allows you to move the TYPO3 context into separate files instead of working with the AdditionalConfiguration.php.

Awesome Lists containing this project

README

          

# TWOH Base

[![TYPO3 13](https://img.shields.io/badge/TYPO3-13-orange.svg)](https://get.typo3.org/version/13)
[![PHP 8.2+](https://img.shields.io/badge/PHP-8.2+-blue.svg)](https://www.php.net/)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/gpl-2.0)

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

```bash
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
[
'Connections' => [
'Default' => [
'host' => 'localhost',
'dbname' => 'typo3',
],
],
],
];
```

### Loading Configuration

Add to your `AdditionalConfiguration.php`:

```php
load();
```

---

## ๐Ÿงช Development

### Running Tests

```bash
composer test:unit
```

### Code Style

```bash
# 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](LICENSE) file for details.

---

## ๐Ÿ‘ฅ Authors

- **Andreas Reichel** โ€“ [a.reichel91@outlook.com](mailto:a.reichel91@outlook.com)
- **Igor Smertin** โ€“ [igor.smertin@web.de](mailto: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.

[![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-โค๏ธ-red?style=for-the-badge&logo=github)](https://github.com/sponsors/twohreichel)

[**Become a Sponsor**](https://github.com/sponsors/twohreichel) โ€“ Every contribution helps us dedicate more time to building great TYPO3 extensions and keeping them up-to-date!

---

## ๐Ÿ”— Links

- [GitHub Repository](https://github.com/twohreichel/twoh_base)
- [Issue Tracker](https://github.com/twohreichel/twoh_base/issues)
- [Documentation](https://docs.typo3.org/p/twoh/twoh_base/main/en-us/)