diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php index 0e6e3582d8..bb923e2a21 100644 --- a/core/lib/Drupal/Core/Config/ConfigManager.php +++ b/core/lib/Drupal/Core/Config/ConfigManager.php @@ -297,8 +297,8 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names $dependency_manager = $this->getConfigDependencyManager(); $dependents = $this->findConfigEntityDependentsAsEntities($type, $names, $dependency_manager); // Store the list of dependencies in three separate variables. This allows - // us to determine the how the dependency graph changes as entities are - // fixed by calling the onDependencyRemoval() method. The variables are: + // us to determine how the dependency graph changes as entities are fixed by + // calling the onDependencyRemoval() method. The variables are: // - $dependents is the list of dependencies to process. This list changes // as entities processed and are fixed or deleted. // - $current_dependencies is the list of dependencies on $names. This list @@ -335,8 +335,9 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names // This will remove entities that are no longer dependent after the // recalculation. $current_dependencies = $this->findConfigEntityDependentsAsEntities($type, $names, $dependency_manager); - // Rebuild the list of entities that we need to process by removing any - // entities that we've already processed. + // Rebuild the list of entities that we need to process using the new + // list of current dependencies and removing any entities that we've + // already processed. $dependents = array_filter($current_dependencies, function ($current_dependency) use ($affected_uuids) { return !in_array($current_dependency->uuid(), $affected_uuids); });