Skip to content

Commit f17c0fa

Browse files
committed
chore: fix deprecations
1 parent 62e4b4e commit f17c0fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Command/GeocodeCommandTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ public function testExecute(): void
6666
->willReturn([]);
6767

6868
$app = new Application($kernel);
69-
$app->addCommand((new GeocodeCommand($geocoder))->setName('geocoder:geocode'));
69+
if (method_exists($app, 'addCommand')) {
70+
// since Symfony 8
71+
$app->addCommand((new GeocodeCommand($geocoder))->setName('geocoder:geocode'));
72+
} else {
73+
$app->add(new GeocodeCommand($geocoder));
74+
}
7075

7176
$command = $app->find('geocoder:geocode');
7277

0 commit comments

Comments
 (0)