mirror of
https://github.com/symfony/dotenv.git
synced 2026-03-23 23:52:14 +01:00
[Console][FrameworkBundle] Remove deprecated Application::add() methods
This commit is contained in:
@@ -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(['']));
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user