Skip to content

Commit 19cf45b

Browse files
authored
Add PHP 8.0 support + Drop PHP < 7.3 support (#17)
* Support PHP 8.0 + Upgrade PHPUnit * Add GitHub Actions * Update GitHub Actions * Migrate from Google Maps to Nominatim since Google Maps doesn't allow keyless access anymore * Update ProviderIntegrationTest.php Update assert functions. * Update GitHub Actions Disable cache. * Update GitHub Actions * Disable fail-fast for GitHub Actions * Run PHPUnit directly (without composer script)
1 parent 0eeac12 commit 19cf45b

15 files changed

+78
-659
lines changed

.cached_responses/maps.googleapis.com_232e58df426ff2103395e35d8dc5dbcec523b150

Lines changed: 0 additions & 551 deletions
This file was deleted.

.cached_responses/maps.googleapis.com_44b980ad45f14ab6d7772d511fbf445e61d2ae22

Lines changed: 0 additions & 70 deletions
This file was deleted.

.cached_responses/maps.googleapis.com_56a86eba9a0b3b14e39bc8c0b13a5ebb4a017803

Lines changed: 0 additions & 5 deletions
This file was deleted.

.cached_responses/maps.googleapis.com_6cdb29002e6540693ed8a9215a280738e1dd8ac6

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s:1596:"[{"place_id":259070493,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"relation","osm_id":1879842,"boundingbox":["51.5032573","51.5036483","-0.1278356","-0.1273038"],"lat":"51.50344025","lon":"-0.12770820958562096","display_name":"Prime Minister’s Office, 10, Downing Street, Westminster, Covent Garden, Westminster, London, Greater London, England, SW1A 2AA, United Kingdom","place_rank":30,"category":"tourism","type":"attraction","importance":0.9187064122051384,"icon":"https://nominatim.openstreetmap.org/ui/mapicons//poi_point_of_interest.p.20.png","address":{"tourism":"Prime Minister’s Office","house_number":"10","road":"Downing Street","quarter":"Westminster","suburb":"Covent Garden","city":"Westminster","state_district":"Greater London","state":"England","postcode":"SW1A 2AA","country":"United Kingdom","country_code":"gb"}},{"place_id":18621002,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"node","osm_id":1931404517,"boundingbox":["51.5032302","51.5033302","-0.1276858","-0.1275858"],"lat":"51.5032802","lon":"-0.1276358","display_name":"10, Downing Street, Westminster, Covent Garden, Westminster, London, Greater London, England, SW1, United Kingdom","place_rank":30,"category":"place","type":"house","importance":0.42099999999999993,"address":{"house_number":"10","road":"Downing Street","quarter":"Westminster","suburb":"Covent Garden","city":"Westminster","state_district":"Greater London","state":"England","postcode":"SW1","country":"United Kingdom","country_code":"gb"}}]";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s:29:"{"error":"Unable to geocode"}";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s:736:"{"place_id":3029686,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"node","osm_id":367142942,"lat":"38.9003895","lon":"-77.0374769","place_rank":30,"category":"building","type":"public","importance":0,"addresstype":"building","name":"United States Chamber of Commerce Building","display_name":"United States Chamber of Commerce Building, H Street Northwest, Washington, Washington, D.C., 20006, United States","address":{"building":"United States Chamber of Commerce Building","road":"H Street Northwest","city":"Washington","state":"Washington, D.C.","postcode":"20006","country":"United States","country_code":"us"},"boundingbox":["38.9003395","38.9004395","-77.0375269","-77.0374269"]}";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s:2:"[]";

.github/workflows/php.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php-version: ['7.3', '7.4', '8.0']
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Use PHP ${{ matrix.php-version }}
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-version }}
26+
extensions: curl
27+
28+
- name: Validate composer.json and composer.lock
29+
run: composer validate
30+
31+
# - name: Cache Composer packages
32+
# id: composer-cache
33+
# uses: actions/cache@v2
34+
# with:
35+
# path: vendor
36+
# key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
37+
# restore-keys: |
38+
# ${{ runner.os }}-php-
39+
40+
- name: Install dependencies
41+
# if: steps.composer-cache.outputs.cache-hit != 'true'
42+
run: composer update --prefer-dist --no-progress
43+
44+
- name: Run test suite
45+
run: ./vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
composer.lock
22
vendor
3+
.phpunit.result.cache

0 commit comments

Comments
 (0)