Skip to content
Open
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
30 changes: 8 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: PHPStan
runs-on: ubuntu-latest
env:
php-version: 8.4
php-version: 8.5
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
Expand All @@ -19,7 +19,7 @@ jobs:
tools: flex

- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v3"
Expand All @@ -35,7 +35,7 @@ jobs:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
env:
php-version: 8.4
php-version: 8.5
PHP_CS_FIXER_IGNORE_ENV: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this env var is deprecated, can you add ->setUnsupportedPhpVersionAllowed(true) to php-cs-fixer.dist.php ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but can be done in a follow-up pr

steps:
- name: "Setup PHP"
Expand All @@ -45,7 +45,7 @@ jobs:
tools: flex, cs2pr

- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v3"
Expand All @@ -62,29 +62,15 @@ jobs:
max-parallel: 10
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.*', '7.3.*' ]
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
sf_version: [ '6.4.*', '7.4.*' ]
exclude:
- php: '7.4'
sf_version: '6.4.*'
- php: '8.0'
sf_version: '6.4.*'
- php: '7.4'
sf_version: '7.2.*'
- php: '8.0'
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.*'
sf_version: '7.4.*'

steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

The changelog describes what have been "Added", "Changed", "Removed" or "Fixed" between versions.

## Version 6.0

### Added

- PHP 8 language features

### Removed

- Remove support for PHP < 8.1
- Remove MapzenFactory
- Remove GeoIPsFactory

## Version 5.19.0

### Changed
Expand Down
92 changes: 45 additions & 47 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,63 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"geocoder-php/plugin": "^1.5",
"php": "^8.1",
"geocoder-php/plugin": "^1.6",
"php-http/curl-client": "^2.3",
"php-http/discovery": "^1.14",
"symfony/console": "^5.4 || ^6.4 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/options-resolver": "^5.4 || ^6.4 || ^7.0",
"willdurand/geocoder": "^4.6|^5.0"
"php-http/discovery": "^1.20",
"symfony/console": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/options-resolver": " ^6.4 || ^7.0",
"willdurand/geocoder": "^4.6.0 || ^5.0"
Comment on lines +21 to +24
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix the invalid/odd constraint formatting on symfony/options-resolver.
Line 23 has a leading space (" ^6.4 || ^7.0"), which is easy to miss and can cause constraint parsing/lockfile churn—normalize it to match the other Symfony constraints.

-    "symfony/options-resolver": " ^6.4 || ^7.0",
+    "symfony/options-resolver": "^6.4 || ^7.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"symfony/console": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/options-resolver": " ^6.4 || ^7.0",
"willdurand/geocoder": "^4.6.0 || ^5.0"
"symfony/console": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/options-resolver": "^6.4 || ^7.0",
"willdurand/geocoder": "^4.6.0 || ^5.0"
🤖 Prompt for AI Agents
In composer.json around lines 21 to 24, the version constraint for
"symfony/options-resolver" has a leading space (" ^6.4 || ^7.0") which is
inconsistent with the other Symfony dependencies and can break constraint
parsing; remove the leading space so the constraint reads like the others (e.g.
"^6.4 || ^7.0") to normalize formatting and prevent lockfile churn.

},
"require-dev": {
"doctrine/annotations": "^1.11.1 || ^2.0",
"doctrine/doctrine-bundle": "^2.3",
"doctrine/doctrine-bundle": "^2.18",
"doctrine/orm": "^2.8 || ^3.0",
"fakerphp/faker": "^1.20",
"fakerphp/faker": "^1.24",
"friendsofphp/php-cs-fixer": "^3.13",
"geocoder-php/algolia-places-provider": "^0.4",
"geocoder-php/arcgis-online-provider": "^4.4",
"geocoder-php/bing-maps-provider": "^4.3",
"geocoder-php/cache-provider": "^4.4.0",
"geocoder-php/chain-provider": "^4.5",
"geocoder-php/free-geoip-provider": "^4.5",
"geocoder-php/geo-plugin-provider": "^4.3",
"geocoder-php/geoip2-provider": "^4.3",
"geocoder-php/geoips-provider": "^4.0",
"geocoder-php/geonames-provider": "^4.4",
"geocoder-php/google-maps-places-provider": "^1.4",
"geocoder-php/google-maps-provider": "^4.7",
"geocoder-php/here-provider": "^0.7",
"geocoder-php/host-ip-provider": "^4.4",
"geocoder-php/ip-info-db-provider": "^4.3",
"geocoder-php/ip-info-provider": "^0.4",
"geocoder-php/ipstack-provider": "^0.4",
"geocoder-php/locationiq-provider": "^1.4",
"geocoder-php/mapbox-provider": "^1.4",
"geocoder-php/mapquest-provider": "^4.3",
"geocoder-php/mapzen-provider": "^4.0",
"geocoder-php/maxmind-binary-provider": "^4.3",
"geocoder-php/maxmind-provider": "^4.4",
"geocoder-php/nominatim-provider": "^5.6",
"geocoder-php/open-cage-provider": "^4.6",
"geocoder-php/openrouteservice-provider": "^1.3",
"geocoder-php/pickpoint-provider": "^4.3",
"geocoder-php/tomtom-provider": "^4.4",
"geocoder-php/yandex-provider": "^4.5",
"geocoder-php/algolia-places-provider": "^0.5",
"geocoder-php/arcgis-online-provider": "^4.5",
"geocoder-php/bing-maps-provider": "^4.4",
"geocoder-php/cache-provider": "^4.5.0",
"geocoder-php/chain-provider": "^4.6",
"geocoder-php/free-geoip-provider": "^4.6",
"geocoder-php/geo-plugin-provider": "^4.4",
"geocoder-php/geoip2-provider": "^4.4",
"geocoder-php/geonames-provider": "^4.5",
"geocoder-php/google-maps-places-provider": "^1.5",
"geocoder-php/google-maps-provider": "^4.8",
"geocoder-php/here-provider": "^0.8",
"geocoder-php/host-ip-provider": "^4.5",
"geocoder-php/ip-info-db-provider": "^4.4",
"geocoder-php/ip-info-provider": "^0.5",
"geocoder-php/ipstack-provider": "^0.5",
"geocoder-php/locationiq-provider": "^1.5",
"geocoder-php/mapbox-provider": "^1.5",
"geocoder-php/mapquest-provider": "^4.4",
"geocoder-php/maxmind-binary-provider": "^4.4",
"geocoder-php/maxmind-provider": "^4.5",
"geocoder-php/nominatim-provider": "^5.8",
"geocoder-php/open-cage-provider": "^4.7",
"geocoder-php/openrouteservice-provider": "^1.4",
"geocoder-php/pickpoint-provider": "^4.4",
"geocoder-php/tomtom-provider": "^4.5",
"geocoder-php/yandex-provider": "^4.6",
"geoip/geoip": "~1.17",
"nyholm/nsa": "^1.3",
"nyholm/psr7": "^1.5",
"nyholm/symfony-bundle-test": "^2.0 || ^3.0",
"nyholm/psr7": "^1.8",
"nyholm/symfony-bundle-test": "^3.1.0",
"php-http/message": "^1.13",
"php-http/mock-client": "^1.6",
"phpstan/phpstan": "^1.9.2",
"psr/http-client": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0",
"symfony/cache": "^5.4 || ^6.4 || ^7.0",
"symfony/config": "^5.4 || ^6.4 || ^7.0",
"symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.0",
"symfony/validator": "^5.4 || ^6.4 || ^7.0",
"symfony/var-exporter": "^5.4 || ^6.4 || ^7.0",
"symfony/yaml": "^5.4 || ^6.4 || ^7.0"
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
"symfony/cache": "^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/phpunit-bridge": "^6.4 || ^7.0",
"symfony/validator": "^6.4 || ^7.0",
"symfony/var-exporter": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 4 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertErrorsToExceptions="false"
convertNoticesToExceptions="false"
convertWarningsToExceptions="false"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
Expand All @@ -28,4 +28,5 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>

</phpunit>
3 changes: 0 additions & 3 deletions src/BazingaGeocoderBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
*/
class BazingaGeocoderBundle extends Bundle
{
/**
* @return void
*/
public function build(ContainerBuilder $container): void
{
parent::build($container);
Expand Down
7 changes: 6 additions & 1 deletion tests/Command/GeocodeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ public function testExecute(): void
->willReturn([]);

$app = new Application($kernel);
$app->add((new GeocodeCommand($geocoder))->setName('geocoder:geocode'));

if (method_exists($app, 'addCommand')) {
$app->addCommand((new GeocodeCommand($geocoder))->setName('geocoder:geocode'));
} else {
$app->add((new GeocodeCommand($geocoder))->setName('geocoder:geocode'));
}

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

Expand Down
28 changes: 0 additions & 28 deletions tests/Functional/BundleInitializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public function testInitBundle(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}
}]);

$container = self::getContainer();
Expand All @@ -70,11 +66,6 @@ public function testBundleWithOneProviderConfiguration(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/simple.yml');
}]);

Expand All @@ -90,11 +81,6 @@ public function testBundleWithCachedProvider(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/cache.yml');
}]);

Expand All @@ -112,11 +98,6 @@ public function testCacheLifetimeCanBeNull(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/cache_without_lifetime.yml');
}]);

Expand All @@ -142,11 +123,6 @@ public function testBundleWithPluginsYml(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/service_plugin.yml');
}]);

Expand All @@ -164,10 +140,6 @@ public function testBundleHasRegisteredDumpers(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}
}]);

$container = self::getContainer();
Expand Down
32 changes: 1 addition & 31 deletions tests/Functional/GeocoderListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected static function createKernel(array $options = []): KernelInterface
$kernel->addTestConfig(static function (ContainerBuilder $container) {
$container->prependExtensionConfig('doctrine', [
'orm' => [
'report_fields_where_declared' => true,
// 'report_fields_where_declared' => true,
],
]);

Expand Down Expand Up @@ -95,13 +95,7 @@ public function testPersistForProperty(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/listener.yml');
$kernel->addTestConfig(__DIR__.'/config/listener_'.(PHP_VERSION_ID >= 80000 ? 'php8' : 'php7').'.yml');
}]);

$container = self::getContainer();
Expand Down Expand Up @@ -173,13 +167,7 @@ public function testPersistForGetter(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/listener.yml');
$kernel->addTestConfig(__DIR__.'/config/listener_'.(PHP_VERSION_ID >= 80000 ? 'php8' : 'php7').'.yml');
}]);

$container = self::getContainer();
Expand Down Expand Up @@ -251,13 +239,7 @@ public function testPersistForInvalidGetter(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/listener.yml');
$kernel->addTestConfig(__DIR__.'/config/listener_'.(PHP_VERSION_ID >= 80000 ? 'php8' : 'php7').'.yml');
}]);

$container = self::getContainer();
Expand All @@ -281,13 +263,7 @@ public function testPersistForEmptyProperty(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/listener.yml');
$kernel->addTestConfig(__DIR__.'/config/listener_'.(PHP_VERSION_ID >= 80000 ? 'php8' : 'php7').'.yml');
}]);

$container = self::getContainer();
Expand All @@ -311,13 +287,7 @@ public function testDoesNotGeocodeIfAddressNotChanged(): void
{
self::bootKernel(['config' => static function (TestKernel $kernel) {
$kernel->addTestConfig(__DIR__.'/config/framework.yml');

if ($kernel::VERSION_ID >= 60000) {
$kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml');
}

$kernel->addTestConfig(__DIR__.'/config/listener.yml');
$kernel->addTestConfig(__DIR__.'/config/listener_'.(PHP_VERSION_ID >= 80000 ? 'php8' : 'php7').'.yml');
}]);

$container = self::getContainer();
Expand Down
Loading
Loading