Search by

esn-cy / omnia-dev

wpa-esncy

Development environment utilities for Omnia Drupal modules.

dev-master 2026-11-17 11:07 UTC

This package is auto-updated.

Last update: 2026-11-17 11:07:43 UTC


README

Omnia Dev Logo
Omnia Developer Utilities

Automated developer tooling for Omnia Drupal modules 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.0 targeting the test environment directory.
  • Dependency Detection: Automatically discovers your module's requirements from .info.yml and composer.json and installs them into the test environment.
  • Loop-Safe Relative Symlinks: Symlinks src/, assets/, config/, templates/, and all module root files into web/modules/custom/<module> 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: web and PHP 8.3+.
    • Creates .ddev/docker-compose.module.yaml to mount your working module repository into the container.
    • Automatically registers post-start hooks to ensure container symmetry and keep JetBrains DB connection ports in sync.
  • Automated JetBrains Database Configuration:
    • Automatically creates and updates .idea/dataSources.xml and .idea/dataSources.local.xml with your DDEV database connection (127.0.0.1:<port>/db) so PhpStorm / DataGrip connects without manual setup or port mismatches.
  • Automated Drupal & Satellite Installation: Runs drush site:install satellite, enables your custom module, and prints a one-time admin login link.

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

2. 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"
  }
}

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

Licence

This project is under the Apache 2.0 Licence.