Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
tools: flex

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

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v3"
Expand All @@ -45,7 +45,7 @@ jobs:
tools: flex, cs2pr

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

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


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

- 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": "^5.0"
},
"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"
},
"conflict": {
"geocoder-php/nominatim-provider": "<5.0"
Expand Down
2 changes: 0 additions & 2 deletions doc/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Here is a list of all provider factories and their options.
| `Bazinga\GeocoderBundle\ProviderFactory\FreeGeoIpFactory` | httplug_client, base_url
| `Bazinga\GeocoderBundle\ProviderFactory\GeoIP2Factory` | provider, database_filename, user_id, license_key, webservice_options, locales, provider_service
| `Bazinga\GeocoderBundle\ProviderFactory\GeoipFactory` |
| `Bazinga\GeocoderBundle\ProviderFactory\GeoIPsFactory` | httplug_client, api_key
| `Bazinga\GeocoderBundle\ProviderFactory\GeonamesFactory` | httplug_client, username
| `Bazinga\GeocoderBundle\ProviderFactory\GeoPluginFactory` | httplug_client
| `Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory` | httplug_client, api_key, region
Expand All @@ -30,7 +29,6 @@ Here is a list of all provider factories and their options.
| `Bazinga\GeocoderBundle\ProviderFactory\LocationIQFactory` | httplug_client, api_key
| `Bazinga\GeocoderBundle\ProviderFactory\MapboxFactory` | httplug_client, api_key, country, mode
| `Bazinga\GeocoderBundle\ProviderFactory\MapQuestFactory` | httplug_client, api_key, licensed
| `Bazinga\GeocoderBundle\ProviderFactory\MapzenFactory` | httplug_client, api_key
| `Bazinga\GeocoderBundle\ProviderFactory\MaxMindBinaryFactory` | dat_file, open_flag
| `Bazinga\GeocoderBundle\ProviderFactory\MaxMindFactory` | httplug_client, api_key, endpoint
| `Bazinga\GeocoderBundle\ProviderFactory\NominatimFactory` | httplug_client, root_url
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>
33 changes: 0 additions & 33 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,11 +140,6 @@ public function testBundleWithPluginXml(): 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.xml');
}]);

Expand All @@ -186,10 +157,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
3 changes: 2 additions & 1 deletion tests/Functional/CustomTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CustomTestKernel extends TestKernel
{
private $warmupDir;

public function reboot(?string $warmupDir)
public function reboot(?string $warmupDir): void
{
$this->shutdown();
$this->warmupDir = $warmupDir;
Expand Down Expand Up @@ -65,6 +65,7 @@ protected function getKernelParameters(): array
'kernel.project_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(),
'kernel.environment' => $this->environment,
'kernel.runtime_environment' => '%env(default:kernel.environment:APP_RUNTIME_ENV)%',
'kernel.runtime_mode.web' => true,
'kernel.debug' => $this->debug,
'kernel.build_dir' => realpath($buildDir = $this->warmupDir ?: $this->getBuildDir()) ?: $buildDir,
'kernel.cache_dir' => realpath($cacheDir = ($this->getCacheDir() === $this->getBuildDir() ? ($this->warmupDir ?: $this->getCacheDir()) : $this->getCacheDir())) ?: $cacheDir,
Expand Down
30 changes: 0 additions & 30 deletions tests/Functional/GeocoderListenerTest.php
Original file line number Diff line number Diff line change
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