Skip to content

Commit 08eab60

Browse files
Merge branch '5.3' into 5.4
* 5.3: [DependencyInjection][HttpKernel] Fix enum typed bindings make login link handler tests time sensitive [CI] Remove macOS jobs Suppress psalm error for UndefinedDocblockClass for PHP 8.1 classes
2 parents a0d8297 + fa8db48 commit 08eab60

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

DependencyInjection/RegisterControllerArgumentLocatorsPass.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ public function process(ContainerBuilder $container)
140140
$type = ltrim($target = (string) ProxyHelper::getTypeHint($r, $p), '\\');
141141
$invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
142142

143-
if (is_subclass_of($type, \UnitEnum::class)) {
144-
// do not attempt to register enum typed arguments
145-
continue;
146-
}
147-
148143
if (isset($arguments[$r->name][$p->name])) {
149144
$target = $arguments[$r->name][$p->name];
150145
if ('?' !== $target[0]) {
@@ -169,6 +164,9 @@ public function process(ContainerBuilder $container)
169164
$args[$p->name] = $bindingValue;
170165
}
171166

167+
continue;
168+
} elseif (is_subclass_of($type, \UnitEnum::class)) {
169+
// do not attempt to register enum typed arguments if not already present in bindings
172170
continue;
173171
} elseif (!$type || !$autowire || '\\' !== $target[0]) {
174172
continue;

0 commit comments

Comments
 (0)