diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5547414..df3800d 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['7.4', '8.0', '8.1'] + php-version: ['8.0', '8.1', '8.2', '8.3', '8.4'] steps: - uses: actions/checkout@v3 - name: Use PHP ${{ matrix.php-version }} @@ -28,8 +28,3 @@ jobs: run: composer install --no-progress - name: Run test suite run: composer run-script test-ci - - name: Send code coverage to Scrutinizer - if: ${{ matrix.php-version == '7.4' }} - run: | - wget -q https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/Tests/IntegrationTest.php b/Tests/IntegrationTest.php index 8b0c3da..68cd3ac 100644 --- a/Tests/IntegrationTest.php +++ b/Tests/IntegrationTest.php @@ -16,15 +16,15 @@ class IntegrationTest extends ProviderIntegrationTest { - protected $testAddress = true; + protected bool $testAddress = true; - protected $testReverse = true; + protected bool $testReverse = true; - protected $testIpv4 = false; + protected bool $testIpv4 = false; - protected $testIpv6 = false; + protected bool $testIpv6 = false; - protected $skippedTests = [ + protected array $skippedTests = [ 'testGeocodeQuery' => 'BAN Server supports France only.', 'testReverseQuery' => 'BAN Server supports France only.', 'testReverseQueryWithNoResults' => 'Addok returns "debug" information for reverse geocoding on coordinates 0, 0. See https://github.com/addok/addok/issues/505', @@ -35,12 +35,13 @@ protected function createProvider(ClientInterface $httpClient) return Addok::withBANServer($httpClient); } - protected function getCacheDir() + protected function getCacheDir(): string { return __DIR__.'/.cached_responses'; } - protected function getApiKey() + protected function getApiKey(): string { + return ''; } } diff --git a/composer.json b/composer.json index acf7706..77d8926 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ } ], "require": { - "php": "^7.4 || ^8.0", - "geocoder-php/common-http": "^4.0", - "willdurand/geocoder": "^4.0" + "php": "^8.0", + "geocoder-php/common-http": "^4.1", + "willdurand/geocoder": "^4.0|^5.0" }, "provide": { "geocoder-php/provider-implementation": "1.0" @@ -37,5 +37,10 @@ "scripts": { "test": "phpunit", "test-ci": "phpunit --coverage-text --coverage-clover=coverage.clover" + }, + "config": { + "allow-plugins": { + "php-http/discovery": false + } } }