Unverified Commit dd90bb90 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3488179 follow-up by alexpott: RecipeConfigurator::getIncludedRecipe()...

Issue #3488179 follow-up by alexpott: RecipeConfigurator::getIncludedRecipe() should statically cache recipe objects to avoid performance problems

(cherry picked from commit e2a92ae2)
parent 66f97b08
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -133,15 +133,15 @@ public function describeAll(): array {
   *   constraints.
   */
  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.
    if (in_array($this->prefix, $processed, TRUE)) {
      return;
    }

    if (is_array($this->values)) {
      throw new \LogicException('Input values cannot be changed once they have been set.');
    }

    // First, collect values for the recipe's dependencies.
    /** @var \Drupal\Core\Recipe\Recipe $dependency */
    foreach ($this->dependencies->recipes as $dependency) {