Skip to content

Commit 170e5a2

Browse files
authored
Merge branch 'master' into photon-reverse-with-osm-filters
2 parents 0c4180a + 722fc19 commit 170e5a2

File tree

198 files changed

+1066
-945
lines changed

Some content is hidden

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

198 files changed

+1066
-945
lines changed

.github/workflows/component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php-version: ['7.4', '8.0', '8.1', '8.2']
17+
php-version: ['8.0', '8.1', '8.2']
1818
component: [Common, Http, Plugin]
1919

2020
name: PHP ${{ matrix.php-version }} / ${{ matrix.component }}

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php-version: ['7.4', '8.0', '8.1', '8.2']
15+
php-version: ['8.0', '8.1', '8.2']
1616
deps: ['low', 'high']
1717
name: PHP ${{ matrix.php-version }} (${{ matrix.deps }})
1818
steps:

.github/workflows/provider.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-version: ['7.4', '8.0', '8.1', '8.2']
16+
php-version: ['8.0', '8.1', '8.2']
1717
provider:
1818
- AlgoliaPlaces
1919
- ArcGISOnline
@@ -67,29 +67,3 @@ jobs:
6767
- name: Run test suite
6868
working-directory: ./src/Provider/${{ matrix.provider }}
6969
run: composer run-script test
70-
71-
test-ext-geoip:
72-
name: PHP ${{ matrix.php-version }} (geoip) / ${{ matrix.provider }}
73-
runs-on: ubuntu-latest
74-
strategy:
75-
fail-fast: false
76-
matrix:
77-
php-version: ['7.4']
78-
provider:
79-
- Geoip
80-
steps:
81-
- uses: actions/checkout@v3
82-
- name: Use PHP ${{ matrix.php-version }}
83-
uses: shivammathur/setup-php@v2
84-
with:
85-
php-version: ${{ matrix.php-version }}
86-
extensions: curl, geoip
87-
- name: Validate composer.json and composer.lock
88-
working-directory: ./src/Provider/${{ matrix.provider }}
89-
run: composer validate
90-
- name: Install dependencies
91-
working-directory: ./src/Provider/${{ matrix.provider }}
92-
run: composer update --no-progress
93-
- name: Run test suite
94-
working-directory: ./src/Provider/${{ matrix.provider }}
95-
run: composer run-script test

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ Region | Provider | Package | Features | Stats
166166
Provider | Package | Features | Stats
167167
:------------- |:------- |:-------- |:-------
168168
[FreeGeoIp](https://github.com/geocoder-php/free-geoip-provider) | `geocoder-php/free-geoip-provider` | IPv4, IPv6 <br> [Website](https://freegeoip.app/) | [![Latest Stable Version](https://poser.pugx.org/geocoder-php/free-geoip-provider/v/stable)](https://packagist.org/packages/geocoder-php/free-geoip-provider) <br>[![Total Downloads](https://poser.pugx.org/geocoder-php/free-geoip-provider/downloads)](https://packagist.org/packages/geocoder-php/free-geoip-provider)
169-
[GeoIP](https://github.com/geocoder-php/geoip-provider) | `geocoder-php/geoip-provider` | IPv4, local <br> [Website](http://www.geoips.com/en/) | [![Latest Stable Version](https://poser.pugx.org/geocoder-php/geoip-provider/v/stable)](https://packagist.org/packages/geocoder-php/geoip-provider) <br>[![Total Downloads](https://poser.pugx.org/geocoder-php/geoip-provider/downloads)](https://packagist.org/packages/geocoder-php/geoip-provider)
170169
[GeoIP2](https://github.com/geocoder-php/geoip2-provider) | `geocoder-php/geoip2-provider` | IPv4 <br> [Website](https://www.maxmind.com/en/geoip2-databases) | [![Latest Stable Version](https://poser.pugx.org/geocoder-php/geoip2-provider/v/stable)](https://packagist.org/packages/geocoder-php/geoip2-provider) <br>[![Total Downloads](https://poser.pugx.org/geocoder-php/geoip2-provider/downloads)](https://packagist.org/packages/geocoder-php/geoip2-provider)
171170
[GeoPlugin](https://github.com/geocoder-php/geo-plugin-provider) | `geocoder-php/geo-plugin-provider` | IPv4, IPv6 <br> [Website](http://www.geoplugin.com/) | [![Latest Stable Version](https://poser.pugx.org/geocoder-php/geo-plugin-provider/v/stable)](https://packagist.org/packages/geocoder-php/geo-plugin-provider) <br>[![Total Downloads](https://poser.pugx.org/geocoder-php/geo-plugin-provider/downloads)](https://packagist.org/packages/geocoder-php/geo-plugin-provider)
172171
[HostIp](https://github.com/geocoder-php/host-ip-provider) | `geocoder-php/host-ip-provider` | IPv4 <br> [Website](http://www.hostip.info/use.html) | [![Latest Stable Version](https://poser.pugx.org/geocoder-php/host-ip-provider/v/stable)](https://packagist.org/packages/geocoder-php/host-ip-provider) <br>[![Total Downloads](https://poser.pugx.org/geocoder-php/host-ip-provider/downloads)](https://packagist.org/packages/geocoder-php/host-ip-provider)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"homepage": "http://geocoder-php.org",
1919
"require": {
20-
"php": "^7.4 || ^8.0",
20+
"php": "^8.0",
2121
"igorw/get-in": "^1.0",
2222
"php-http/discovery": "^1.4",
2323
"php-http/message-factory": "^1.0.2",

phpstan-baseline.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ parameters:
55
count: 1
66
path: src/Common/ProviderAggregator.php
77

8+
-
9+
message: "#^Method Geocoder\\\\TimedGeocoder\\:\\:__call\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
10+
count: 1
11+
path: src/Common/TimedGeocoder.php
12+
13+
-
14+
message: "#^Method Geocoder\\\\Provider\\\\Cache\\\\ProviderCache\\:\\:__call\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
15+
count: 1
16+
path: src/Provider/Cache/ProviderCache.php
17+
818
-
919
message: "#^Parameter \\#1 \\$locations of class Geocoder\\\\Model\\\\AddressCollection constructor expects array\\<Geocoder\\\\Location\\>, array\\<string, string\\> given\\.$#"
1020
count: 2

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
includes:
22
- phpstan-baseline.neon
33
parameters:
4-
level: 5
4+
level: 6
55
paths:
66
- src
77
excludePaths:

src/Common/.github/workflows/component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-version: ['7.4', '8.0', '8.1', '8.2']
16+
php-version: ['8.0', '8.1', '8.2']
1717
steps:
1818
- uses: actions/checkout@v3
1919
- name: Use PHP ${{ matrix.php-version }}

src/Common/Assert.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,35 @@
1616

1717
class Assert
1818
{
19-
/**
20-
* @param float $value
21-
*/
22-
public static function latitude($value, string $message = '')
19+
public static function latitude(mixed $value, string $message = ''): void
2320
{
2421
self::float($value, $message);
2522
if ($value < -90 || $value > 90) {
2623
throw new InvalidArgument(sprintf($message ?: 'Latitude should be between -90 and 90. Got: %s', $value));
2724
}
2825
}
2926

30-
/**
31-
* @param float $value
32-
*/
33-
public static function longitude($value, string $message = '')
27+
public static function longitude(mixed $value, string $message = ''): void
3428
{
3529
self::float($value, $message);
3630
if ($value < -180 || $value > 180) {
3731
throw new InvalidArgument(sprintf($message ?: 'Longitude should be between -180 and 180. Got: %s', $value));
3832
}
3933
}
4034

41-
public static function notNull($value, string $message = '')
35+
public static function notNull(mixed $value, string $message = ''): void
4236
{
4337
if (null === $value) {
4438
throw new InvalidArgument(sprintf($message ?: 'Value cannot be null'));
4539
}
4640
}
4741

48-
private static function typeToString($value): string
42+
private static function typeToString(mixed $value): string
4943
{
5044
return is_object($value) ? get_class($value) : gettype($value);
5145
}
5246

53-
private static function float($value, string $message)
47+
private static function float(mixed $value, string $message): void
5448
{
5549
if (!is_float($value)) {
5650
throw new InvalidArgument(sprintf($message ?: 'Expected a float. Got: %s', self::typeToString($value)));

src/Common/Dumper/AbstractArrayDumper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
*/
2020
abstract class AbstractArrayDumper
2121
{
22+
/**
23+
* @return array{type: 'Feature', geometry: array{type: 'Point', coordinates: array{0: float, 1: float}}, properties: array<string, mixed>, bounds?: array{south: float, west: float, north: float, east: float}}
24+
*/
2225
protected function getArray(Location $location): array
2326
{
2427
$properties = array_filter($location->toArray(), function ($value) {

0 commit comments

Comments
 (0)