DDEV Drupal Dev¶
A DDEV add-on for working on Drupal core and contrib modules together, using a core git checkout as the project root.
Other add-ons target either core or contrib in isolation. This one is for when you need both:
- developing a contrib module against the latest core,
- fixing a core bug that affects contrib,
- running contrib tests on a core patch.
Extra dependencies (contrib modules, Drush, dev tools) are managed through a composer.local.json overlay, keeping core's composer.json and composer.lock untouched.
Quick start¶
git clone https://git.drupalcode.org/project/drupal.git drupal-dev
cd drupal-dev
ddev config --project-type=drupal12
ddev start
ddev add-on get amateescu/ddev-drupal-dev
ddev restart
ddev composer install
Then clone a contrib module and run its tests:
See Getting started for the details.
Where to go next¶
- Contrib modules: clone, switch and remove modules you work on.
- Core: switch core branches.
- Merge requests: check out a drupal.org merge request with one command.
- Dependencies: add packages, pin core's locked versions.
- Running tests: PHPUnit against MySQL, MariaDB, PostgreSQL or SQLite, and browser tests.
- Code quality: PHPStan, PHP CodeSniffer, cspell and core's pre-commit checks.
- Working from the host: shell helpers, direnv and tab completion.
- Commands: every command and option.
Comparison with other add-ons¶
| Add-on | Core | Contrib modules | Use it when |
|---|---|---|---|
| ddev-drupal-dev | Git checkout | Any number, as git checkouts | You work on core and contrib at the same time |
| ddev-drupal-core-dev | Git checkout | None | You only work on core |
| ddev-drupal-contrib | Composer dependency | One | You work on one contrib module and don't need a core checkout |
| ddev-drupal-suite | Composer dependency | Several | You work on several contrib modules and don't need a core checkout |