Skip to content

Commit 1b0ca62

Browse files
committed
ci: add tests for PHP 8.5
1 parent 647f80a commit 1b0ca62

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->add((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)