Skip to content

Commit bac904f

Browse files
committed
Test on PHP 8
1 parent d525666 commit bac904f

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
strategy:
1212
matrix:
1313
php: ['7.1', '7.2', '7.3', '7.4']
14+
coverage: [true]
15+
composer-flags: ['']
16+
include:
17+
- php: '8.0'
18+
coverage: false
19+
composer-flags: '--ignore-platform-req=php'
1420

1521
steps:
1622
- uses: actions/checkout@v2
@@ -24,6 +30,14 @@ jobs:
2430

2531
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
2632

27-
- run: composer update --no-progress
33+
- name: "Use PHPUnit 9.3+ on PHP 8"
34+
run: composer require --no-update --dev phpunit/phpunit:^9.3
35+
if: "matrix.php == '8.0'"
36+
37+
- run: composer update --no-progress ${{ matrix.composer-flags }}
38+
39+
- run: vendor/bin/phpunit --no-coverage
40+
if: ${{ !matrix.coverage }}
2841

2942
- run: vendor/bin/phpunit --coverage-text
43+
if: ${{ matrix.coverage }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^7.1"
26+
"php": "^7.1 || ^8.0"
2727
},
2828
"require-dev": {
2929
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3"

0 commit comments

Comments
 (0)