You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a #[AsMessageHandler] on a method (except __invoke) taking a union will prevent compilation.
How to reproduce
#[AsMessageHandler]
public function method(A|B $message): void {}
Possible Solution
In the MessengerPass::guessHandledClasses() method, every path except the one dealing with union types return if method is known array<class-string, method> else array<int, class-string>. Code path dealing with unions does not.