Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Symfony 7.3 support #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.*'
Expand All @@ -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"
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions src/Command/GeocodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,6 +24,7 @@
/**
* @author Markus Bachmann <[email protected]>
*/
#[AsCommand(name: 'geocoder:geocode', description: 'Geocode an address or a ip address')]
class GeocodeCommand extends Command
{
private ProviderAggregator $geocoder;
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/GeocodeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
1 change: 1 addition & 0 deletions tests/baseline-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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.%