We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62e4b4e commit f17c0faCopy full SHA for f17c0fa
tests/Command/GeocodeCommandTest.php
@@ -66,7 +66,12 @@ public function testExecute(): void
66
->willReturn([]);
67
68
$app = new Application($kernel);
69
- $app->addCommand((new GeocodeCommand($geocoder))->setName('geocoder:geocode'));
+ 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
+ }
75
76
$command = $app->find('geocoder:geocode');
77
0 commit comments