Skip to content

Commit c651d1e

Browse files
authored
Merge branch 'master' into feature/allow-phpunit-10-11
2 parents 72fbe66 + 2835d11 commit c651d1e

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "monthly"
12+
- package-ecosystem: "composer" # See documentation for possible values
13+
directory: "/" # Location of package manifests
14+
schedule:
15+
interval: "monthly"

.github/workflows/php.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
15+
php-version: ['8.2', '8.3', '8.4', '8.5']
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
- name: Use PHP ${{ matrix.php-version }}
1919
uses: shivammathur/setup-php@v2
2020
with:
@@ -31,13 +31,9 @@ jobs:
3131
runs-on: ubuntu-latest
3232
name: PHPStan
3333
steps:
34-
- uses: actions/checkout@v4
35-
- name: Use PHP 8.3
36-
uses: shivammathur/setup-php@v2
37-
with:
38-
php-version: 8.3
39-
extensions: curl
34+
- uses: actions/checkout@v5
35+
- uses: shivammathur/setup-php@v2
4036
- name: Install dependencies
4137
run: composer install --no-progress
4238
- name: Run PHPStan
43-
run: composer run-script analyse
39+
run: composer run-script analyse

composer.json

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.3 || ^8.0",
19+
"php": ">=8.2",
2020
"nyholm/psr7": "^1.0",
2121
"php-http/curl-client": "^2.2",
2222
"php-http/mock-client": "^1.2",
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"geocoder-php/nominatim-provider": "^5.3",
28-
"phpstan/phpstan": "^1.10"
28+
"phpstan/phpstan": "^1.10 || ^2.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

src/BaseTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract protected function getCacheDir();
3131
/**
3232
* Get a real HTTP client. If a cache dir is set to a path it will use cached responses.
3333
*/
34-
protected function getHttpClient(string $apiKey = null): ClientInterface
34+
protected function getHttpClient(?string $apiKey = null): ClientInterface
3535
{
3636
if (null !== $cacheDir = $this->getCacheDir()) {
3737
return new CachedResponseClient(new HttplugClient(), $cacheDir, $apiKey);
@@ -43,7 +43,7 @@ protected function getHttpClient(string $apiKey = null): ClientInterface
4343
/**
4444
* Get a mocked HTTP client that never do calls over the internet. Use this is you want to control the response data.
4545
*/
46-
protected function getMockedHttpClient(string $body = null, int $statusCode = 200): ClientInterface
46+
protected function getMockedHttpClient(?string $body = null, int $statusCode = 200): ClientInterface
4747
{
4848
$client = new MockedHttpClient();
4949
$client->addResponse(new Response($statusCode, [], $body));

src/ProviderIntegrationTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function testGeocodeIpv6(): void
215215
* @param string $message
216216
*/
217217
#[DataProvider('exceptionDataProvider')]
218-
public function testExceptions($query, string $exceptionClass, ResponseInterface $response = null, string $message = ''): void
218+
public function testExceptions($query, string $exceptionClass, ?ResponseInterface $response = null, string $message = ''): void
219219
{
220220
if (isset($this->skippedTests[__FUNCTION__])) {
221221
$this->markTestSkipped($this->skippedTests[__FUNCTION__]);
@@ -313,7 +313,6 @@ private function assertWellFormattedResult(Collection $result): void
313313
'Location::getAdminLevels MUST always return a AdminLevelCollection'
314314
);
315315
$arrayData = $location->toArray();
316-
$this->assertTrue(is_array($arrayData), 'Location::toArray MUST return an array.');
317316
$this->assertNotEmpty($arrayData, 'Location::toArray cannot be empty.');
318317

319318
// Verify coordinates

0 commit comments

Comments
 (0)