Problem/Motivation

While working on the composer plugin to process recipes I hit a massive problem. We can not guarantee that Drupal will be installed when the recipe is being required by composer.

Proposed resolution

The prosed composer plugin cannot be responsible for applying the recipes. We need to develop:

  • A recipe runner that is responsible for applying a recipe.
  • The recipe runner can read recipes from PROJECT_ROOT/recipes and core/recipes
  • The composer plugin is only responsible for unpacking the recipes dependencies and copying the recipe to PROJECT_ROOT/recipes

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
daniel.bosen’s picture

I think it is the right approach to split the responsibilities of installing dependencies and running them, into two separate things. It also sounds very reasonable to put the dependency and codebase building into composer space and the "apply to installation" part into Drupal space.

Decoupling the development of these two things is an added benefit.
I am a bit hesitant to put this into RTBC so quickly, but it gets my +1.

alexpott’s picture

I think I will merge this since requiring database connectivity and an installed Drupal while doing composer require is just not going to work. There's just no way around that. Once this is merged I'll open tasks for all the items in phase 1 of recipe roadmap.

daniel.bosen’s picture

Status: Needs review » Reviewed & tested by the community

In the end, this is a no-brainer. It was discussed in the the bi-weekly distribution meeting in slack and bircher +1 it there as well. Quote:

"maybe I misunderstood the proposal at first but the way I thought this was going to work was always a drupal-thing with its UI running things on top of a minimal drupal (so that it can run as the last step of the installer basically) and then call out to a flex type composer plugin via the automatic updates composer API (or similar) as part of the pipeline, recursing when other recipes are part of the recipe to apply. So this is not really a surprise in terms of what to expect. And I agree with the proposed split."

So, lets RTBC it.

  • alexpott committed 2bac61b on 1.0.x
    Issue #3291663 by alexpott, daniel.bosen: The composer plugin cannot...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @daniel.bosen

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.