[Console][FrameworkBundle] Remove deprecated Application::add() methods

This commit is contained in:
HypeMC
2025-06-13 02:20:31 +02:00
parent 61212d37da
commit 01c3819ff3
2 changed files with 3 additions and 7 deletions

View File

@@ -60,13 +60,8 @@ $app->getDefinition()->addOption(
new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost)
);
$command = new ServerDumpCommand(new DumpServer($host, $logger));
if (method_exists($app, 'addCommand')) {
$app->addCommand($command);
} else {
$app->add($command);
}
$app
$app->addCommand($command = new ServerDumpCommand(new DumpServer($host, $logger)))
->getApplication()
->setDefaultCommand($command->getName(), true)
->run($input, $output)
;

View File

@@ -29,6 +29,7 @@
"twig/twig": "^3.12"
},
"conflict": {
"symfony/console": "<7.4",
"symfony/error-handler": "<7.4"
},
"autoload": {