You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This DDEV add-on streamlines the setup of development environments for working on Drupal contributed modules. It’s specifically designedto make it easy to contribute to two or more contrib modules simultaneously—especially useful when one module depends on another.With just a few commands, you can spin up any version of Drupal core, clone multiple contrib modules into the environment,and start developing or testing changes across them in parallel.
Features
Spin up any version of Drupal core into a DDEV environment.
Clone any combination of contrib modules.
Download and install Drupal recipes.
Download any other Drupal contrib module.
Run PHPStan, PHPUnit, and PHPCS on your contrib modules.
No need to add DDEV specific artifacts to your contrib modules.
Install
Let's say you need to work on theai module for Drupal 11.2.2, you can run the following commands:
mkdir ai-dev&&cd ai-devddev config --project-type=drupal11 --docroot=web --php-version=8.3 --corepack-enableddev add-on get lussoluca/ddev-drupal-suiteddev drupal-init 11.2.2ddev auth sshddev drupal-get-module ai 1.2.x
This will set up a DDEV environment with Drupal 11.2.2 and clone the1.2.x branch of theai module into theweb/modules/contrib/ai directory.You can then work in theweb/modules/contrib/ai directory as usual, by adding your changes, committing them, and pushing them to your remote repository.
Work on more modules
If later you also need to work on theai_agents module, you can add its source code to your DDEV environment by running:
ddev drupal-get-module ai_agents 1.2.x
Require other contrib modules
If you just need a contrib module or theme to be present, but you don't need to work on it, you can use standardcomposer commands to add it to your DDEV environment:
You can also download Drupal recipes to your DDEV environment. For example, to download thedrupal/ai_dev_recipe recipe, you can run:
ddev drupal-get-recipe ai_dev_recipe
This will download the recipe and install it in your DDEV environment, making it available for use.
Run PHPStan, PHPUnit, and PHPCS
You can run PHPStan, PHPUnit, and PHPCS on your contrib modules by using the following commands:
ddev phpstan aiddev phpunit aiddev phpcs ai
These commands will analyze theai module for bugs, run unit tests, and check coding standards, respectively.You can replaceai with the name of any other module you have cloned into your DDEV environment.
About
Set up a DDEV environment for developing Drupal contrib modules