Skip to content

Commit

Permalink
Fix type binding
Browse files Browse the repository at this point in the history
  • Loading branch information
sveneld authored and nicolas-grekas committed Feb 16, 2022
1 parent b3347b3 commit 068e688
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 068e688

Please sign in to comment.