Skip to content

Commit fa011d6

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Lock] Release DoctrineDbalPostgreSqlStore connection lock on failure [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 b79c787 + 08eab60 commit fa011d6

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
@@ -123,11 +123,6 @@ public function process(ContainerBuilder $container)
123123
$type = ltrim($target = (string) ProxyHelper::getTypeHint($r, $p), '\\');
124124
$invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
125125

126-
if (is_subclass_of($type, \UnitEnum::class)) {
127-
// do not attempt to register enum typed arguments
128-
continue;
129-
}
130-
131126
if (isset($arguments[$r->name][$p->name])) {
132127
$target = $arguments[$r->name][$p->name];
133128
if ('?' !== $target[0]) {
@@ -152,6 +147,9 @@ public function process(ContainerBuilder $container)
152147
$args[$p->name] = $bindingValue;
153148
}
154149

150+
continue;
151+
} elseif (is_subclass_of($type, \UnitEnum::class)) {
152+
// do not attempt to register enum typed arguments if not already present in bindings
155153
continue;
156154
} elseif (!$type || !$autowire || '\\' !== $target[0]) {
157155
continue;

0 commit comments

Comments
 (0)