diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php index eee92e6..0ca34d6 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php @@ -157,14 +157,8 @@ public function process(ContainerBuilder $container) { } // Add in extra arguments. if (isset($extra_arguments[$id])) { - // Don't overwrite the primary arguments. - unset($extra_arguments[$id][$interface_pos]); - unset($extra_arguments[$id][$priority_pos]); - unset($extra_arguments[$id][$id_pos]); // Place extra arguments in their right positions. - foreach ($extra_arguments[$id] as $pos => $argument) { - $arguments[$pos] = $argument; - } + $arguments += $extra_arguments[$id]; } // Sort the arguments by position. ksort($arguments);