You can set up Composer to read Drupal's git repo instead of using packagist for the modules by following these steps: 1 There is a docs page at /docs/9/install-drupal-9 greggles at 14:50 Add a comment 2 Answers Sorted by: 12 create-project can take a version number, and recommended-project has some tags in for 9.x, so for example: composer create-project drupal/recommended-project mynewproject '9. Make sure to specify the branch name prefixed with 'dev-'. You can find this URL under the 'show commands' section of the issue fork.
Add the specific git URL to your repositories section.Add an exclude key for your module under the repositories section where the Composer source is listed.Here is a summary of the steps you need to follow: Official advice for using issue forks to make compatibility fixes work with Composer can be found at Use issue forks to make compatibility fixes work with Composer. Using Drupal's Lenient Composer Endpointįor Drupal 9, the official advice is to use a specially made lenient endpoint as described in Using Drupal's Lenient Composer Endpoint.
This process can help you avoid duplicating the contrib module in your project's custom codebase and streamline your workflow. In this blog post, we will discuss how to install a Drupal 8 contrib module with a Drupal 9 patch using Composer.