Problem/Motivation
#3605549: Allow install profiles to specify a list of recipes that should be applied granted install profiles the superpower of identifying recipes to apply automatically.
However, at the moment, only core recipes are supported. Recipe path resolution was an open question in the other issue, but it was decided to proceed with this approach:
We could introspect the Composer configuration for the project to determine where drupal-recipe packages will be installed, and resolve relative to that. This is what Drupal CMS does, and is probably the most robust choice.
Proposed resolution
Implement the ability for a profile to reference recipes that are not core recipes, but live in the general directory where Composer is configured to install recipes. If no such directory is configured, the recipe system will die with an error, and that is the kind of loud failure that should be allowable.
Remaining tasks
Create a RecipeConfigurator::recipesDirectory() method (or similarly named) which introspects Composer to get the directory where recipes should be installed. That will be used as the base for determining the paths of referenced recipes. The location should be statically cached, since it's slightly expensive to compute (we have to read and parse composer.json) and it is very unlikely to change mid-request.
API changes
TBD but the experimental recipe system may gain a new public method.
Data model changes
None
Release notes snippet
TBD
Issue fork drupal-3612240
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments