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

Skip to content

Commit 443ca06

Browse files
ArchitectNatexabbuh
authored andcommitted
Account for UnionTypes with custom handler methods when using attribute tag
1 parent d47f513 commit 443ca06

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