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
thrownewRuntimeException(sprintf('Invalid handler service "%s": class "%s" must have an "__invoke()" method.', $serviceId, $handlerClass->getName()));
226
+
thrownewRuntimeException(sprintf('Invalid handler service "%s": class "%s" must have an "%s()" method.', $serviceId, $handlerClass->getName(), $methodName));
225
227
}
226
228
227
229
if (0 === $method->getNumberOfRequiredParameters()) {
228
-
thrownewRuntimeException(sprintf('Invalid handler service "%s": method "%s::__invoke()" requires at least one argument, first one being the message it handles.', $serviceId, $handlerClass->getName()));
230
+
thrownewRuntimeException(sprintf('Invalid handler service "%s": method "%s::%s()" requires at least one argument, first one being the message it handles.', $serviceId, $handlerClass->getName(), $methodName));
229
231
}
230
232
231
233
$parameters = $method->getParameters();
232
234
if (!$type = $parameters[0]->getType()) {
233
-
thrownewRuntimeException(sprintf('Invalid handler service "%s": argument "$%s" of method "%s::__invoke()" must have a type-hint corresponding to the message class it handles.', $serviceId, $parameters[0]->getName(), $handlerClass->getName()));
235
+
thrownewRuntimeException(sprintf('Invalid handler service "%s": argument "$%s" of method "%s::%s()" must have a type-hint corresponding to the message class it handles.', $serviceId, $parameters[0]->getName(), $handlerClass->getName(), $methodName));
234
236
}
235
237
236
238
if ($typeinstanceof \ReflectionUnionType) {
@@ -247,10 +249,10 @@ private function guessHandledClasses(\ReflectionClass $handlerClass, string $ser
247
249
}
248
250
249
251
if ($type->isBuiltin()) {
250
-
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(), $typeinstanceof \ReflectionNamedType ? $type->getName() : (string) $type));
252
+
thrownewRuntimeException(sprintf('Invalid handler service "%s": type-hint of argument "$%s" in method "%s::%s()" must be a class , "%s" given.', $serviceId, $parameters[0]->getName(), $handlerClass->getName(), $methodName, $typeinstanceof \ReflectionNamedType ? $type->getName() : (string) $type));
0 commit comments