Problem/Motivation

Right now, the recipe system validates everything in the config.actions section of recipe.yml, trying to confirm that every module mentioned in that section (i.e., in the prefix of the config entities' names) is either installed already, or will be installed by a recipe in the stack.

That's a bit too strict -- required modules should not need to be listed, because they are always guaranteed to be installed. Fixing this will allow Recipe objects to be instantiated during the early installer, which is important for Drupal CMS.

Proposed resolution

In \Drupal\Core\Recipe\Recipe::validateConfigActions(), treat required modules as installed, even if they're not. Because we know they will be.

Issue fork drupal-3477329

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

phenaproxima created an issue. See original summary.

thejimbirch’s picture

Issue tags: +Recipes initiative
phenaproxima’s picture

Title: Recipe validation should consider modules that are available, not just the ones listed in recipe.yml » Recipe validation should always treat required modules as installed
phenaproxima’s picture

phenaproxima changed the visibility of the branch 3477329-recipe-validation-should to hidden.

phenaproxima’s picture

Issue summary: View changes
Issue tags: +Needs tests, +Starshot blocker
phenaproxima’s picture

Status: Active » Needs review
Issue tags: -Needs issue summary update

b_sharpe’s picture

Status: Needs review » Needs work

Small typo and suggestion. Code is fine.

phenaproxima’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests

Added test coverage. I think this is good to go!

thejimbirch’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me. Appreciate @b_sharpe for also reviewing! Marking RTBC

alexpott’s picture

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 81f055eb1ca to 11.x and 69e817f5330 to 11.0.x and 326f814f5c1 to 10.4.x and c371e81a32f to 10.3.x. Thanks!

alexpott’s picture

  • alexpott committed c371e81a on 10.3.x
    Issue #3477329 by phenaproxima, thejimbirch, b_sharpe: Recipe validation...

  • alexpott committed 326f814f on 10.4.x
    Issue #3477329 by phenaproxima, thejimbirch, b_sharpe: Recipe validation...

  • alexpott committed 69e817f5 on 11.0.x
    Issue #3477329 by phenaproxima, thejimbirch, b_sharpe: Recipe validation...

  • alexpott committed 81f055eb on 11.x
    Issue #3477329 by phenaproxima, thejimbirch, b_sharpe: Recipe validation...

Status: Fixed » Closed (fixed)

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