diff --git a/src/Framework/ExecutionOrderDependency.php b/src/Framework/ExecutionOrderDependency.php index 9d5419b3e75..35ee5404373 100644 --- a/src/Framework/ExecutionOrderDependency.php +++ b/src/Framework/ExecutionOrderDependency.php @@ -88,11 +88,13 @@ public static function mergeUnique(array $existing, array $additional): array ); foreach ($additional as $dependency) { - if (in_array($dependency->getTarget(), $existingTargets, true)) { + $additionalTarget = $dependency->getTarget(); + + if (in_array($additionalTarget, $existingTargets, true)) { continue; } - $existingTargets[] = $dependency->getTarget(); + $existingTargets[] = $additionalTarget; $existing[] = $dependency; }