Created
May 31, 2025 18:30
-
-
Save megclaypool/96c63a457505a6c61e9be0aa4cb9a69b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Make sure your composer file includes the following: | |
```yml | |
"extra": { | |
"installer-paths": { | |
... | |
"recipes/{$name}": [ | |
"type:drupal-recipe" | |
] | |
} | |
} | |
``` | |
2. Make sure the composer installers are at *least* 2.3 or higher. `composer require 'composer/installers:^2.3'` *** | |
3. Install whatever recipes you want using composer, eg: `composer require 'getrootid/radicati-recipe-media:^1'` | |
4. To apply a recipe, use either: | |
`php core/scripts/drupal recipe recipes/[recipe-name] -v` | |
or | |
`drush recipe recipes/[recipe-name] -v` | |
*** I figured it out how to get our Drupal Recipes installing into web/recipes instead of vendor/getrootid 🎉 | |
You know how in your composer.json, you can set up installer paths, and then in your custom composer packages you can set a type, and the package can get installed to a specific path based on its type? Well, it turns out that you can’t put just anything there — if your type isn’t on this list: https://github.com/composer/installers?tab=readme-ov-file#current-supported-package-types, you can’t use it. And it turns out that a) drupal-recipe was added as a package type to composer/installers v2.3.0 as of June 24, 2024 and b) Pantheon’s Drupal 10 composer.json installs composer/installers v1.9 :woman-facepalming::skin-tone-4: | |
So, the solution is to update the composer/installers to ^2.3.0 before installing recipes and then the recipes install to the correct place :slightly_smiling_face: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment