Skip to content

Commit c7c75e8

Browse files
Add support for PHP 8 (#21)
1 parent cf5642a commit c7c75e8

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.github/workflows/php.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,37 @@ on:
1010

1111
jobs:
1212
build:
13-
strategy:
13+
strategy:
1414
matrix:
1515
php: ['7.2', '7.3', '7.4']
1616
phpunit: ['8.0', '9.0']
17+
composer-arg: ['']
18+
include:
19+
- php: '8.0'
20+
phpunit: '9.0'
21+
composer-arg: 'ignore-platform-req=php'
1722
exclude:
23+
- php: '8.0'
24+
phpunit: '8.0'
1825
- php: '7.2'
1926
phpunit: '9.0'
2027
runs-on: ubuntu-latest
2128

29+
continue-on-error: ${{ matrix.php == '8.0' }}
30+
name: PHP ${{ matrix.php }}, PHPUnit ${{ matrix.phpunit }}
31+
2232
steps:
2333
- uses: actions/checkout@v1
24-
34+
2535
- name: Setup PHP
2636
uses: shivammathur/setup-php@v1
2737
with:
2838
php-version: ${{ matrix.php }}
2939
extensions: mbstring, intl, json
3040
coverage: pcov
31-
41+
42+
tools: composer:v2
43+
3244
- name: Validate composer.json and composer.lock
3345
run: composer validate
3446

@@ -37,10 +49,10 @@ jobs:
3749
composer require --no-update --dev phpunit/phpunit ~${{ matrix.phpunit }}
3850
3951
- name: Install dependencies
40-
run: composer install --prefer-dist --no-progress --no-suggest
52+
run: composer install --prefer-dist --no-progress --no-suggest --${{ matrix.composer-arg }}
4153

4254
#- name: Run type checker
4355
# run: ./vendor/bin/psalm
44-
56+
4557
- name: Run unit tests
4658
run: ./vendor/bin/phpunit --testdox

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.1",
12+
"php": "^7.1 || ^8.0",
1313
"helmich/phpunit-json-assert": "^3.2",
1414
"psr/http-message": "^1.0"
1515
},

0 commit comments

Comments
 (0)