Settingsphp
This is a Composer plugin that standardizes how `settings.php` is managed by keeping the main file clean and using included files for additional configuration. It allows for management through environment variables, provides sensible defaults, and includes opinionated best practices, while still allowing for extensions and overrides.
settingsphp is a composer plugin that provides a layout of settings.*.php files,
managed as scaffold files.
The aim of this plugin is to propose an standardisation around the management of settings.php.
It has been designed to accomplish the following principles:
1. Keep main settings.php files clean.
In our vision it should be a copy of default.settings.php with minimal additions at the end.
This project adds a single include line to settings.php.
2. Allow configuration via environment variables.
Allowing configuration via environment variables enhances security, flexibility,
and portability by separating configuration from code, simplifying deployment,
and supporting dynamic customization.
3. Provide sane defaults.
By providing sane defaults we aim to reduce configuration overhead by ensuring
Drupal works out-of-the-box with minimal setup.
4. Provide (opinionated) best practices from sbitio.
File settings.recommended.php provides sbitio specific Drupal settings.
Those are some of the tricks and best practices we've learned in managing a variety of sites across the years.
5. Allow to extend and override everything.
Extension points to tweak and suit your needs are provided.
See README for installation and usage instructions.