Skip to content

Commit 7a8d33e

Browse files
author
tlsvda
committed
Support PHP version 8.0
1 parent 56d7e05 commit 7a8d33e

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/test.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test
22
on: push
33

44
jobs:
5-
test:
5+
test-php7_2:
66
runs-on: ubuntu-18.04
77
strategy:
88
matrix:
@@ -31,3 +31,32 @@ jobs:
3131

3232
- name: Run tests
3333
run: make check
34+
test-php8:
35+
runs-on: ubuntu-18.04
36+
strategy:
37+
matrix:
38+
prefer: [ "prefer-stable", "prefer-lowest" ]
39+
steps:
40+
- name: checkout
41+
uses: actions/checkout@v2
42+
43+
- name: Setup PHP
44+
uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: '8.0'
47+
tools: composer:v2
48+
49+
- name: Get Composer Cache Directory
50+
id: composer-cache
51+
run: |
52+
echo "::set-output name=dir::$(composer config cache-files-dir)"
53+
- uses: actions/cache@v2
54+
with:
55+
path: ${{ steps.composer-cache.outputs.dir }}
56+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.prefer }}-
57+
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
58+
- name: Composer Install
59+
run: composer update --${{ matrix.prefer }} --no-interaction --no-progress --no-ansi
60+
61+
- name: Run tests
62+
run: make check

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.2",
13+
"php": "^7.2||^8.0",
1414
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
1515
"escapestudios/symfony2-coding-standard": "^3.6",
1616
"phpmd/phpmd": "^2.9",

0 commit comments

Comments
 (0)