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

This commit is contained in:
HypeMC
2025-06-13 02:20:31 +02:00
parent 1bbfc1d109
commit 46655a0b7f
2 changed files with 2 additions and 11 deletions

View File

@@ -288,11 +288,7 @@ OUTPUT;
$command = new DebugCommand($env, $projectDirectory);
$application = new Application();
if (method_exists($application, 'addCommand')) {
$application->addCommand($command);
} else {
$application->add($command);
}
$application->addCommand($command);
$tester = new CommandCompletionTester($application->get('debug:dotenv'));
$this->assertSame(['FOO', 'TEST'], $tester->complete(['']));
}

View File

@@ -95,12 +95,7 @@ EOF
private function createCommand(): CommandTester
{
$application = new Application();
$command = new DotenvDumpCommand(__DIR__);
if (method_exists($application, 'addCommand')) {
$application->addCommand($command);
} else {
$application->add($command);
}
$application->addCommand(new DotenvDumpCommand(__DIR__));
return new CommandTester($application->find('dotenv:dump'));
}