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
thrownewLogicException(\sprintf('The class "%s" must implement the "__invoke()" method to be registered as an invokable command.', $reflector->getName()));
thrownewInvalidArgumentException(\sprintf('The service "%s" tagged "%s" must either be a subclass of "%s" or have an "__invoke()" method.', $id, 'console.command', Command::class));
55
+
}
56
+
}
57
+
58
+
50
59
if (isset($tags[0]['command'])) {
51
60
$aliases = $tags[0]['command'];
52
61
} else {
53
-
if (!$r = $container->getReflectionClass($class)) {
54
-
thrownewInvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
55
-
}
56
-
if (!$r->isSubclassOf(Command::class)) {
57
-
thrownewInvalidArgumentException(\sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, 'console.command', Command::class));
$this->expectExceptionMessage('The service "my-command" tagged "console.command" must be a subclass of "Symfony\Component\Console\Command\Command".');
209
+
$this->expectExceptionMessage('The service "my-command" tagged "console.command" must either be a subclass of "Symfony\Component\Console\Command\Command" or have an "__invoke()" method');
0 commit comments