diff --git a/core/lib/Drupal/Core/Recipe/InputConfigurator.php b/core/lib/Drupal/Core/Recipe/InputConfigurator.php index 9dbc977f84f..4e429ef70cf 100644 --- a/core/lib/Drupal/Core/Recipe/InputConfigurator.php +++ b/core/lib/Drupal/Core/Recipe/InputConfigurator.php @@ -124,18 +124,20 @@ final class InputConfigurator { * * @param \Drupal\Core\Recipe\InputCollectorInterface $collector * The input collector to use. + * @param string[] $processed + * The names of the recipes for which input has already been collected. + * Internal use only, should not be passed in by calling code. * * @throws \Symfony\Component\Validator\Exception\ValidationFailedException * Thrown if any of the collected values violate their validation * constraints. */ - public function collectAll(InputCollectorInterface $collector): void { + public function collectAll(InputCollectorInterface $collector, array &$processed = []): void { if (is_array($this->values)) { throw new \LogicException('Input values cannot be changed once they have been set.'); } // Don't bother collecting values for a recipe we've already seen. - static $processed = []; if (in_array($this->prefix, $processed, TRUE)) { return; } @@ -143,7 +145,7 @@ final class InputConfigurator { // First, collect values for the recipe's dependencies. /** @var \Drupal\Core\Recipe\Recipe $dependency */ foreach ($this->dependencies->recipes as $dependency) { - $dependency->input->collectAll($collector); + $dependency->input->collectAll($collector, $processed); } $this->values = [];