8000 Account for UnionTypes with custom handler methods when using attribu… · symfony/symfony@2c79d20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c79d20

Browse files
committed
Account for UnionTypes with custom handler methods when using attribute tag
1 parent 9178e22 commit 2c79d20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private function guessHandledClasses(\ReflectionClass $handlerClass, string $ser
231231
}
232232

233233
if ($types) {
234-
return $types;
234+
return ('__invoke' === $methodName) ? $types : array_fill_keys($types, $methodName);
235235
}
236236
}
237237

0 commit comments

Comments
 (0)
0