Streamlined Workflow for Contrib Modules with Composer Dependencies
- Source: Method for cloning and working on Drupal contrib projects by Michael Anello (September 4, 2025)
Michael Anello outlines a Composer-based workflow for contributing to Drupal contrib projects with dependencies. For modules like Markdown Easy and Smart Trim, a direct clone into web/modules/contrib/ isn’t sufficient when Composer packages are involved. Instead, Anello recommends cloning modules into a top-level /modules directory and updating composer.json to include a "path" repository pointing to ./modules/*.
This setup allows contributors to use composer require drupal/project_name, triggering dependency resolution and symlinking into the contrib directory. The approach enables clean Composer workflows across multiple contrib projects and is a staple in Anello’s training during DrupalEasy office hours.


