Unable to pass input to Recipe installer from a kernel test

Created on 5 August 2025, 1 day ago

Problem/Motivation

While working on 🐛 Kernel tests for recipes are significantly slower than Functional tests Active I created GenericRecipeTestBase, a kernel-test base class that exposed a performance regression.
When attempting to install the Standard recipe from a kernel test, its dependent recipe feedback_contact_form did not receive its fallback default value for recipient.
After replicating the input-capture logic used in Drupal\Core\Recipe\RecipeCommand::execute(), the install advanced but then failed due to the defensive checks introduced in 🐛 Recipes that depend on other recipes break RecipeInputFormTrait Active .

Steps to reproduce

Run the test from https://git.drupalcode.org/project/drupal/-/merge_requests/12916 without changes on core/lib/Drupal/Core/Recipe/InputConfigurator.php

Proposed resolution

Partially revert the logic introduced in #3495305 🐛 Recipes that depend on other recipes break RecipeInputFormTrait Active and refine it so that:

  • Input defaults provided by configuration are honored for dependent recipes.
  • The defensive guard continues to protect against genuinely missing input.

Remaining tasks

  • Add a kernel test that installs a recipe which, in turn, depends on another recipe requiring input with a default supplied from configuration.

    Note: \Drupal\KernelTests\Core\Recipe\InputTest::testDefaultValueFromConfig() currently passes because it tests a top-level recipe rather than a recipe with a recipe dependency that needs input.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Original report by [username]

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

recipe system

Created by

🇭🇺Hungary mxr576 Hungary

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024