From 068e68821ae9e208f68c64b186f961486478cb79 Mon Sep 17 00:00:00 2001 From: Volodymyr Panivko Date: Tue, 15 Feb 2022 09:26:57 +0200 Subject: [PATCH] Fix type binding --- .../RegisterControllerArgumentLocatorsPass.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 871e3807c6..bcf2b5d9a7 100644 --- a/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -151,12 +151,12 @@ public function process(ContainerBuilder $container) $args[$p->name] = $bindingValue; } + continue; + } elseif (!$type || !$autowire || '\\' !== $target[0]) { continue; } elseif (is_subclass_of($type, \UnitEnum::class)) { // do not attempt to register enum typed arguments if not already present in bindings continue; - } elseif (!$type || !$autowire || '\\' !== $target[0]) { - continue; } elseif (!$p->allowsNull()) { $invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE; }