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
$messageClassLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : sprintf('used as argument type in method "%s::__invoke()"', $r->getName());
74
-
75
-
thrownewRuntimeException(sprintf('Invalid handler service "%s": message class "%s" %s does not exist.', $serviceId, $handles, $messageClassLocation));
$messageClassLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : sprintf('used as argument type in method "%s::__invoke()"', $r->getName());
88
+
89
+
thrownewRuntimeException(sprintf('Invalid handler service "%s": message class "%s" %s does not exist.', $serviceId, $messageClass, $messageClassLocation));
@@ -129,7 +147,7 @@ private function guessHandledClass(\ReflectionClass $handlerClass, string $servi
129
147
thrownewRuntimeException(sprintf('Invalid handler service "%s": type-hint of argument "$%s" in method "%s::__invoke()" must be a class , "%s" given.', $serviceId, $parameters[0]->getName(), $handlerClass->getName(), $type));
* @expectedExceptionMessage Invalid handler service "Symfony\Component\Messenger\Tests\DependencyInjection\UndefinedMessageHandler": message class "Symfony\Component\Messenger\Tests\DependencyInjection\UndefinedMessage" used as argument type in method "Symfony\Component\Messenger\Tests\DependencyInjection\UndefinedMessageHandler::__invoke()" does not exist.
@@ -192,3 +223,24 @@ public function __invoke(string $message)
192
223
{
193
224
}
194
225
}
226
+
227
+
class HandlerWithMultipleMessages implements HandlerInterface
228
+
{
229
+
publicstaticfunctiongetHandledMessages(): array
230
+
{
231
+
returnarray(
232
+
DummyMessage::class,
233
+
SecondMessage::class,
234
+
);
235
+
}
236
+
}
237
+
238
+
class PrioritisedHandler implements HandlerInterface
0 commit comments