-
Notifications
You must be signed in to change notification settings - Fork 303
Open
Description
Hello
After upgrading my dependencies, I am getting the following error message after every Robo command (including just robo):
ERROR: Since symfony/console 7.4: The "Symfony\Component\Console\Application::add()" method is deprecated and will be removed in Symfony 8.0, use "Symfony\Component\Console\Application::addCommand()" instead.
It seems to be related to src/Robo.php in registerSingle() method:
// If the instance is a Symfony Command, register it with
// the application
if ($instance instanceof Command) {
$app->add($instance); // <--- DEPRECATED
return $instance;
}
// Register commands for all of the public methods in the RoboFile.
$commandFactory = $container->get('commandFactory');
$commandList = $commandFactory->createCommandsFromClass($instance);
foreach ($commandList as $command) {
$app->add($command); // <--- DEPRECATED
}
return $instance;Replacing them with ->addCommand() removes the error message. I am not sure what other impact it could have.
Added #1184
Metadata
Metadata
Assignees
Labels
No labels