+ // Store the list of dependents in three separate variables. This allows us
+ // to determine how the dependency graph changes as entities are fixed by
+ // calling the onDependencyRemoval() method.
+
+ // The list of original dependents on $names. This list never changes.
+ $original_dependents = $this->findConfigEntityDependentsAsEntities($type, $names, $dependency_manager);
+
+ // The current list of dependents on $names. This list is recalculated when
+ // calling an entity's onDependencyRemoval() method results in the entity
+ // changing. This list is passed to each entity's onDependencyRemoval()
+ // method as the list of affected entities.
+ $current_dependents = $original_dependents;
+
+ // The list of dependents to process. This list changes as entities are
+ // processed and are either fixed or deleted.
+ $dependents_to_process = $original_dependents;
+
+ // Initialize other variables.
+ $affected_uuids = [];