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()));
211
+
thrownewRuntimeException(sprintf('Invalid handler service "%s": class "%s" must have an "%s()" method.', $serviceId, $handlerClass->getName(), $methodName));
210
212
}
211
213
212
214
if (0 === $method->getNumberOfRequiredParameters()) {
213
-
thrownewRuntimeException(sprintf('Invalid handler service "%s": method "%s::__invoke()" requires at least one argument, first one being the message it handles.', $serviceId, $handlerClass->getName()));
215
+
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));
214
216
}
215
217
216
218
$parameters = $method->getParameters();
217
219
if (!$type = $parameters[0]->getType()) {
218
-
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()));
220
+
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));
219
221
}
220
222
221
223
if ($typeinstanceof \ReflectionUnionType) {
@@ -232,10 +234,10 @@ private function guessHandledClasses(\ReflectionClass $handlerClass, string $ser
232
234
}
233
235
234
236
if ($type->isBuiltin()) {
235
-
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));
237
+
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