Skip to content

Commit f312116

Browse files
authored
Merge branch 'geocoder-php:master' into master
2 parents a533074 + 0cc8519 commit f312116

166 files changed

Lines changed: 1212 additions & 632 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
name: PHP ${{ matrix.php-version }} / ${{ matrix.component }}
3030

3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333

3434
- name: Use PHP ${{ matrix.php-version }}
3535
uses: shivammathur/setup-php@v2

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: 'Checkout Repository'
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
- name: 'Dependency Review'
2020
uses: actions/dependency-review-action@v4

.github/workflows/php.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
deps: ['low', 'high']
1717
name: PHP ${{ matrix.php-version }} (${{ matrix.deps }})
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020
- name: Use PHP ${{ matrix.php-version }}
2121
uses: shivammathur/setup-php@v2
2222
with:
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
name: PHPStan
4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v5
4444
- name: Use PHP 8.3
4545
uses: shivammathur/setup-php@v2
4646
with:
@@ -55,7 +55,7 @@ jobs:
5555
runs-on: ubuntu-latest
5656
name: PHP CS Fixer
5757
steps:
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@v5
5959
- name: Use PHP 8.3
6060
uses: shivammathur/setup-php@v2
6161
with:

.github/workflows/provider.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- TomTom
5353
- Yandex
5454
steps:
55-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@v5
5656
- name: Use PHP ${{ matrix.php-version }}
5757
uses: shivammathur/setup-php@v2
5858
with:

.github/workflows/subtree.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
name: Subtree for Common
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/create-github-app-token@v1
22+
- uses: actions/create-github-app-token@v2
2323
id: app-token
2424
with:
2525
app-id: ${{ vars.SUBTREE_APP_ID }}
2626
private-key: ${{ secrets.SUBTREE_APP_PRIVATE_KEY }}
2727
owner: ${{ github.repository_owner }}
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
with:
3030
token: ${{ steps.app-token.outputs.token }}
3131
fetch-depth: 0
@@ -39,13 +39,13 @@ jobs:
3939
name: Subtree for Http
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/create-github-app-token@v1
42+
- uses: actions/create-github-app-token@v2
4343
id: app-token
4444
with:
4545
app-id: ${{ vars.SUBTREE_APP_ID }}
4646
private-key: ${{ secrets.SUBTREE_APP_PRIVATE_KEY }}
4747
owner: ${{ github.repository_owner }}
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v5
4949
with:
5050
token: ${{ steps.app-token.outputs.token }}
5151
fetch-depth: 0
@@ -59,13 +59,13 @@ jobs:
5959
name: Subtree for Plugin
6060
runs-on: ubuntu-latest
6161
steps:
62-
- uses: actions/create-github-app-token@v1
62+
- uses: actions/create-github-app-token@v2
6363
id: app-token
6464
with:
6565
app-id: ${{ vars.SUBTREE_APP_ID }}
6666
private-key: ${{ secrets.SUBTREE_APP_PRIVATE_KEY }}
6767
owner: ${{ github.repository_owner }}
68-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@v5
6969
with:
7070
token: ${{ steps.app-token.outputs.token }}
7171
fetch-depth: 0
@@ -107,6 +107,7 @@ jobs:
107107
- { folder: LocationIQ, repository: locationiq-provider }
108108
- { folder: MapQuest, repository: mapquest-provider }
109109
- { folder: Mapbox, repository: mapbox-provider }
110+
- { folder: MapTiler, repository: maptiler-provider }
110111
# - { folder: Mapzen, repository: mapzen-provider }
111112
- { folder: MaxMind, repository: maxmind-provider }
112113
- { folder: MaxMindBinary, repository: maxmind-binary-provider }
@@ -119,13 +120,13 @@ jobs:
119120
- { folder: TomTom, repository: tomtom-provider }
120121
- { folder: Yandex, repository: yandex-provider }
121122
steps:
122-
- uses: actions/create-github-app-token@v1
123+
- uses: actions/create-github-app-token@v2
123124
id: app-token
124125
with:
125126
app-id: ${{ vars.SUBTREE_APP_ID }}
126127
private-key: ${{ secrets.SUBTREE_APP_PRIVATE_KEY }}
127128
owner: ${{ github.repository_owner }}
128-
- uses: actions/checkout@v4
129+
- uses: actions/checkout@v5
129130
with:
130131
token: ${{ steps.app-token.outputs.token }}
131132
fetch-depth: 0

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"homepage": "http://geocoder-php.org",
1919
"require": {
2020
"php": ">=8.2",
21-
"igorw/get-in": "^1.0",
2221
"php-http/discovery": "^1.17",
2322
"php-http/promise": "^1.0",
2423
"psr/http-client-implementation": "^1.0",
@@ -41,7 +40,7 @@
4140
"phpstan/extension-installer": "^1.3",
4241
"phpstan/phpstan": "^1.10",
4342
"phpstan/phpstan-phpunit": "^1.3",
44-
"phpunit/phpunit": "^9.6",
43+
"phpunit/phpunit": "^9.6.11",
4544
"symfony/http-client": "^5.4.45 || ^6.4 || ^7.0",
4645
"symfony/stopwatch": "^5.4 || ^6.4 || ^7.0"
4746
},

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ parameters:
77
excludePaths:
88
- **/vendor/**
99
treatPhpDocTypesAsCertain: false
10-
checkGenericClassInNonGenericObjectType: false

src/Common/Dumper/Gpx.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ public function dump(Location $location): string
3131
xmlns="http://www.topografix.com/GPX/1/0"
3232
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
3333

34-
GPX
35-
, Geocoder::VERSION);
34+
GPX, Geocoder::VERSION);
3635

3736
if (null !== $bounds = $location->getBounds()) {
3837
$gpx .= sprintf(<<<'GPX'
3938
<bounds minlat="%f" minlon="%f" maxlat="%f" maxlon="%f"/>
4039

41-
GPX
42-
, $bounds->getWest(), $bounds->getSouth(), $bounds->getEast(), $bounds->getNorth());
40+
GPX, $bounds->getWest(), $bounds->getSouth(), $bounds->getEast(), $bounds->getNorth());
4341
}
4442

4543
$lat = null;
@@ -55,8 +53,7 @@ public function dump(Location $location): string
5553
<type><![CDATA[Address]]></type>
5654
</wpt>
5755

58-
GPX
59-
, $lat, $lon, $this->formatName($location));
56+
GPX, $lat, $lon, $this->formatName($location));
6057

6158
$gpx .= <<<'GPX'
6259
</gpx>

src/Common/Tests/Dumper/GpxTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public function testDump(): void
4848
<type><![CDATA[Address]]></type>
4949
</wpt>
5050
</gpx>
51-
GPX
52-
, Geocoder::VERSION, '0', '0');
51+
GPX, Geocoder::VERSION, '0', '0');
5352

5453
$result = $this->dumper->dump($address);
5554

@@ -77,8 +76,7 @@ public function testDumpWithData(): void
7776
<type><![CDATA[Address]]></type>
7877
</wpt>
7978
</gpx>
80-
GPX
81-
, Geocoder::VERSION, $address->getCoordinates()->getLatitude(), $address->getCoordinates()->getLongitude());
79+
GPX, Geocoder::VERSION, $address->getCoordinates()->getLatitude(), $address->getCoordinates()->getLongitude());
8280

8381
$result = $this->dumper->dump($address);
8482

@@ -114,8 +112,7 @@ public function testDumpWithBounds(): void
114112
<type><![CDATA[Address]]></type>
115113
</wpt>
116114
</gpx>
117-
GPX
118-
, Geocoder::VERSION, $bounds['east'], '48.863151', $bounds['east'], '48.863151', $bounds['north'], $bounds['west']);
115+
GPX, Geocoder::VERSION, $bounds['east'], '48.863151', $bounds['east'], '48.863151', $bounds['north'], $bounds['west']);
119116

120117
$this->assertNotNull($address->getBounds());
121118

@@ -159,8 +156,7 @@ public function testDumpWithName(): void
159156
<type><![CDATA[Address]]></type>
160157
</wpt>
161158
</gpx>
162-
GPX
163-
, Geocoder::VERSION, $bounds['east'], '48.863151', $bounds['east'], '48.863151', $bounds['north'], $bounds['west']);
159+
GPX, Geocoder::VERSION, $bounds['east'], '48.863151', $bounds['east'], '48.863151', $bounds['north'], $bounds['west']);
164160

165161
$this->assertNotNull($address->getBounds());
166162

src/Common/Tests/TimedGeocoderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testGeocode(): void
4747
{
4848
$this->delegate->expects($this->once())
4949
->method('geocodeQuery')
50-
->will($this->returnValue(new AddressCollection([])));
50+
->willReturn(new AddressCollection([]));
5151

5252
$this->geocoder->geocode('foo');
5353

@@ -74,7 +74,7 @@ public function testReverse(): void
7474
{
7575
$this->delegate->expects($this->once())
7676
->method('reverseQuery')
77-
->will($this->returnValue(new AddressCollection([])));
77+
->willReturn(new AddressCollection([]));
7878

7979
$this->geocoder->reverse(0, 0);
8080

0 commit comments

Comments
 (0)