esn-cy / omnia-dev
Development environment utilities for Omnia Drupal modules and themes.
Requires
- php: ^8.3 || ^8.4 || ^8.5
- ext-dom: *
- composer/composer: ^2
- symfony/console: ^6.0 || ^7.0
- symfony/filesystem: ^6.0 || ^7.0
- symfony/process: ^6.0 || ^7.0
- symfony/yaml: ^6.0 || ^7.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README

Omnia Developer Utilities
Automated developer tooling for Omnia Drupal modules and themes to instantly scaffold and manage local DDEV test environments powered by ESN Satellite 5.
Features
- Automated Satellite 5 Scaffolding: Runs
composer create-project esn/satellite-project:^5.0targeting the test environment directory. - Dependency Detection: Automatically discovers your module's or theme's requirements from
.info.ymlandcomposer.jsonand installs them into the test environment. - Loop-Safe Relative Symlinks: Symlinks
src/,assets/,config/,templates/,css/,js/, and all extension root files intoweb/modules/custom/<module>(orweb/themes/custom/<theme>fortype: theme) using relative paths that resolve seamlessly on macOS, Linux, and inside Docker containers while preventing infinite recursive scanning loops. - Automated DDEV Configuration:
- Configures DDEV with
docroot: weband PHP 8.3+. - Creates
.ddev/docker-compose.module.yamlto mount your working repository into the container. - Automatically registers
post-starthooks to ensure container symmetry and keep JetBrains DB connection ports in sync.
- Configures DDEV with
- Automated JetBrains Database Configuration:
- Automatically creates and updates
.idea/dataSources.xmland.idea/dataSources.local.xmlwith your DDEV database connection (127.0.0.1:<port>/db) so PhpStorm / DataGrip connects without manual setup or port mismatches.
- Automatically creates and updates
- Automated Drupal & Satellite Installation: Runs
drush site:install satellite, enables your custom module or theme (setting custom themes as default), and prints a one-time admin login link. - Cross-Platform Local Test-Matrix Runner (
test-matrix): Runs PHPUnit inside isolated Docker/Podman containers across Drupal 10 and Drupal 11 and supported PHP versions (8.3,8.4,8.5) without modifying your host PHP version,composer.json,composer.lock, orvendor/.
Prerequisites
- PHP 8.3+ and Composer 2 on the host (to install and invoke
omnia-dev). - Docker (Docker Desktop, OrbStack, Docker Engine, or Podman) — required for
test-matrix(and by DDEV). - DDEV — required for the Satellite test environment commands (
init,uli,db).
Installation
Add omnia-dev to your Drupal module's composer.json under require-dev:
composer require --dev esn-cy/omnia-dev
(Or point to your local path repository during development).
Usage
1. Command Line Interface (CLI)
Run the CLI binary from your module repository root:
# Full end-to-end setup (Satellite project, DDEV, symlinks, site-install, enable module) ./vendor/bin/omnia-dev init # Options: ./vendor/bin/omnia-dev init --dir=test-env --php=8.3 --account-name=admin --account-pass=admin --force # Update or refresh module symlinks if you added new directories/files ./vendor/bin/omnia-dev link # Generate a one-time admin login link for the test environment ./vendor/bin/omnia-dev uli # Configure or refresh the JetBrains IDE database connection (.idea/dataSources.xml) ./vendor/bin/omnia-dev db # Run the full local Drupal 10/11 & PHP test matrix in Docker ./vendor/bin/omnia-dev test-matrix
2. Local Test-Matrix Runner (test-matrix)
Test any Drupal module locally against both Drupal 10 and Drupal 11 across supported PHP versions on macOS, Linux, and Windows using Docker Desktop, OrbStack, Docker Engine, or Podman.
Supported Matrix
| Drupal Version | Composer Constraint | Supported PHP Versions | PHPUnit Config |
|---|---|---|---|
| Drupal 10 | ^10.3 |
8.3, 8.4 (PHP 8.5 skipped — unsupported by D10) |
phpunit.d10.xml (falls back to phpunit.xml) |
| Drupal 11 | ^11 |
8.3, 8.4, 8.5 |
phpunit.xml |
How It Works
- Builds parameterized
php:<version>-cliimages (docker/test-matrix/Dockerfile) withgd,openssl,simplexml,pdo,mbstring,xdebug,git,unzip, and Composer 2 pre-installed. - Persists Composer's download cache in a named Docker volume (
omnia-dev-composer-cache) so repeat runs are fast. - Mounts the target module read-only into the container, copies project files into
/app(excludingvendor/,composer.lock,.phpunit.cache/,reports/, and any local DDEV sandbox directory), pinsdrupal/coreanddrupal/core-dev, runscomposer update --prefer-dist --no-interaction --no-progress, and executes./vendor/bin/phpunit. - Never modifies your host PHP version,
composer.json,composer.lock, orvendor/. - Prints a pass/fail summary table at the end and exits non-zero if any combination fails.
Usage Examples
# Run the full matrix against the current directory (all 5 Drupal/PHP combinations) ./vendor/bin/omnia-dev test-matrix # Test a specific module directory ./vendor/bin/omnia-dev test-matrix /path/to/my-drupal-module # Filter by Drupal version (10, 11, or all) and/or PHP version (8.3, 8.4, 8.5, or all) ./vendor/bin/omnia-dev test-matrix --drupal=10 ./vendor/bin/omnia-dev test-matrix --drupal=11 --php=8.5 ./vendor/bin/omnia-dev test-matrix --php=8.4 # Enable Xdebug code coverage (XDEBUG_MODE=coverage; omitted by default with --no-coverage for speed) ./vendor/bin/omnia-dev test-matrix --drupal=11 --php=8.4 --coverage # Pass arbitrary arguments straight through to PHPUnit after "--" ./vendor/bin/omnia-dev test-matrix -- --filter=MyTest ./vendor/bin/omnia-dev test-matrix /path/to/module --drupal=10 -- --filter=MyTest --stop-on-failure # Force rebuilding cached test-matrix Docker images without cache ./vendor/bin/omnia-dev test-matrix --rebuild
3. Composer Scripts Integration
Add the script handlers to your module's composer.json:
{
"scripts": {
"dev:setup": "Drupal\\omnia_dev\\Composer\\ScriptHandler::setup",
"dev:link": "Drupal\\omnia_dev\\Composer\\ScriptHandler::link",
"dev:uli": "Drupal\\omnia_dev\\Composer\\ScriptHandler::uli",
"dev:db": "Drupal\\omnia_dev\\Composer\\ScriptHandler::db",
"test:matrix": "Drupal\\omnia_dev\\Composer\\ScriptHandler::testMatrix"
}
}
Now any developer checking out your repository can run:
# Sets up DDEV, installs Satellite, and links your module composer dev:setup # Get an instant login URL composer dev:uli # Refresh symlinks composer dev:link # Configure or refresh JetBrains IDE database connection composer dev:db # Run the local Drupal 10/11 & PHP test matrix composer test:matrix # Pass options and PHPUnit arguments through Composer composer test:matrix -- --drupal=11 --php=8.4 -- --filter=MyTest
Licence
This project is under the Apache 2.0 Licence.