Skip to content

Commit 01c3819

Browse files
committed
[Console][FrameworkBundle] Remove deprecated Application::add() methods
1 parent 61212d3 commit 01c3819

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Resources/bin/var-dump-server

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ $app->getDefinition()->addOption(
6060
new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost)
6161
);
6262

63-
$command = new ServerDumpCommand(new DumpServer($host, $logger));
64-
if (method_exists($app, 'addCommand')) {
65-
$app->addCommand($command);
66-
} else {
67-
$app->add($command);
68-
}
69-
$app
63+
$app->addCommand($command = new ServerDumpCommand(new DumpServer($host, $logger)))
64+
->getApplication()
7065
->setDefaultCommand($command->getName(), true)
7166
->run($input, $output)
7267
;

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"twig/twig": "^3.12"
3030
},
3131
"conflict": {
32+
"symfony/console": "<7.4",
3233
"symfony/error-handler": "<7.4"
3334
},
3435
"autoload": {

0 commit comments

Comments
 (0)