diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86865d3..640f13a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: fail-fast: false matrix: php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] - sf_version: [ '5.4.*', '6.4.*', '7.2.*' ] + sf_version: [ '5.4.*', '6.4.*', '7.2.*', '7.3.*' ] exclude: - php: '7.4' sf_version: '6.4.*' @@ -75,6 +75,12 @@ jobs: sf_version: '7.2.*' - php: '8.1' sf_version: '7.2.*' + - php: '7.4' + sf_version: '7.3.*' + - php: '8.0' + sf_version: '7.3.*' + - php: '8.1' + sf_version: '7.3.*' steps: - name: "Checkout code" @@ -87,6 +93,10 @@ jobs: tools: flex coverage: none + - name: Configure minimum stability + if: matrix.sf_version == '7.3' + run: composer config minimum-stability beta + - name: "Install Composer dependencies" env: SYMFONY_REQUIRE: ${{ matrix.sf_version }} diff --git a/config/services.yml b/config/services.yml index 35a4cd2..aa01e01 100644 --- a/config/services.yml +++ b/config/services.yml @@ -27,7 +27,7 @@ services: Bazinga\GeocoderBundle\Command\GeocodeCommand: arguments: ['@Geocoder\ProviderAggregator'] tags: - - { name: 'console.command', command: 'geocoder:geocode' } + - { name: 'console.command', command: 'geocoder:geocode', description: 'Geocode an address or a ip address' } Bazinga\GeocoderBundle\Validator\Constraint\AddressValidator: arguments: ['@geocoder'] diff --git a/src/Command/GeocodeCommand.php b/src/Command/GeocodeCommand.php index 12b0c50..e4de483 100644 --- a/src/Command/GeocodeCommand.php +++ b/src/Command/GeocodeCommand.php @@ -14,6 +14,7 @@ use Geocoder\ProviderAggregator; use Geocoder\Query\GeocodeQuery; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -23,6 +24,7 @@ /** * @author Markus Bachmann */ +#[AsCommand(name: 'geocoder:geocode', description: 'Geocode an address or a ip address')] class GeocodeCommand extends Command { private ProviderAggregator $geocoder; @@ -40,8 +42,6 @@ public function __construct(ProviderAggregator $geocoder) protected function configure() { $this - ->setName('geocoder:geocode') - ->setDescription('Geocode an address or a ip address') ->addArgument('address', InputArgument::REQUIRED, 'The address') ->addOption('provider', null, InputOption::VALUE_OPTIONAL) ->setHelp(<<<'HELP' diff --git a/tests/Command/GeocodeCommandTest.php b/tests/Command/GeocodeCommandTest.php index f43ad53..203ef8e 100644 --- a/tests/Command/GeocodeCommandTest.php +++ b/tests/Command/GeocodeCommandTest.php @@ -66,7 +66,7 @@ public function testExecute(): void ->willReturn([]); $app = new Application($kernel); - $app->add(new GeocodeCommand($geocoder)); + $app->add((new GeocodeCommand($geocoder))->setName('geocoder:geocode')); $command = $app->find('geocoder:geocode'); diff --git a/tests/baseline-ignore b/tests/baseline-ignore index d17aaf2..042f65a 100644 --- a/tests/baseline-ignore +++ b/tests/baseline-ignore @@ -81,3 +81,4 @@ %Geocoder\\Model\\Address::__construct\(\): Implicitly marking parameter \$country as nullable is deprecated, the explicit nullable type must be used instead% %Geocoder\\Model\\Address::__construct\(\): Implicitly marking parameter \$timezone as nullable is deprecated, the explicit nullable type must be used instead% %Geocoder\\ProviderAggregator::__construct\(\): Implicitly marking parameter \$decider as nullable is deprecated, the explicit nullable type must be used instead% +%Since symfony/var-exporter 7.3: The "Symfony\\Component\\VarExporter\\LazyGhostTrait" trait is deprecated, use native lazy objects instead.%