Skip to content

Commit 97a0905

Browse files
authored
PHP 8: add official support (#17)
* composer.json: add PHP 8 support * Test on PHP 7 and PHP 8
1 parent 6a3283f commit 97a0905

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,24 @@ on: [push]
55
jobs:
66
build-test:
77
runs-on: ubuntu-latest
8-
8+
9+
strategy:
10+
matrix:
11+
php-versions: ['7.4', '8.0']
12+
name: PHP ${{ matrix.php-versions }} Test
13+
914
steps:
10-
- uses: actions/checkout@v2
11-
- uses: php-actions/composer@v1
12-
- name: PHPUnit Tests
13-
uses: php-actions/phpunit@v9
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
1420
with:
15-
configuration: ./phpunit.xml
21+
php-version: ${{ matrix.php-versions }}
22+
tools: composer:v2, phpunit:v9
23+
24+
- name: Install Dependencies
25+
run: composer install
26+
27+
- name: PHPUnit Tests
28+
run: vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^7.3",
15+
"php": "^7.3 || ^8.0 ",
1616
"ext-json": "*",
1717
"ext-curl": "*",
1818
"psr/http-message": "^1.0",

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
33
<testsuites>
44
<testsuite name="main">
5-
<directory phpVersion="7.3.0" phpVersionOperator="&gt;=" suffix="Test.php">tests</directory>
5+
<directory suffix="Test.php">tests</directory>
66
<exclude>tests/FronteggApiTest.php</exclude>
77
</testsuite>
88
</testsuites>

0 commit comments

Comments
 (0)