Skip to content

Commit 61212d3

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: [Console] Support enum in invokable commands fix missing newline [Console] Simplify using invokable commands when the component is used standalone [Console] Fix setting aliases & hidden via name remove no longer needed conflict rule on symfony/event-dispatcher [JsonStreamer] Add PHPDoc to generated code [SecurityBundle] register alias for argument for password hasher
2 parents 4281224 + f3c60ef commit 61212d3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Resources/bin/var-dump-server

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

63-
$app->add($command = new ServerDumpCommand(new DumpServer($host, $logger)))
64-
->getApplication()
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
6570
->setDefaultCommand($command->getName(), true)
6671
->run($input, $output)
6772
;

0 commit comments

Comments
 (0)