Skip to content

Commit 62722fb

Browse files
committed
Allow PHP 8.2
1 parent 49d1e43 commit 62722fb

2 files changed

Lines changed: 28 additions & 13 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ name: "CI"
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
workflow_dispatch:
99

1010
permissions:
1111
contents: read
1212

13+
env:
14+
PHP_STABLE_VERSION: '8.4'
15+
1316
jobs:
1417
cs:
1518
name: "Code style"
@@ -18,10 +21,10 @@ jobs:
1821
- name: "Git: checkout"
1922
uses: actions/checkout@v4
2023

21-
- name: "PHP: setup 8.3"
24+
- name: "PHP: setup ${{ env.PHP_STABLE_VERSION }}"
2225
uses: shivammathur/setup-php@v2
2326
with:
24-
php-version: '8.3'
27+
php-version: ${{ env.PHP_STABLE_VERSION }}
2528
coverage: none
2629
tools: php-cs-fixer
2730

@@ -43,20 +46,20 @@ jobs:
4346
steps:
4447
- name: "Git: checkout"
4548
uses: actions/checkout@v4
46-
47-
- name: "PHP: setup 8.4"
49+
50+
- name: "PHP: setup ${{ env.PHP_STABLE_VERSION }}"
4851
uses: shivammathur/setup-php@v2
4952
with:
50-
php-version: '8.4'
53+
php-version: ${{ env.PHP_STABLE_VERSION }}
5154
coverage: pcov
5255
tools: phpstan
53-
56+
5457
- name: "Composer: install"
5558
run: composer install --prefer-dist --no-interaction --no-progress
56-
59+
5760
- name: "PHPStan: version"
5861
run: phpstan --version
59-
62+
6063
- name: "PHPStan: analyze"
6164
run: phpstan analyze --memory-limit=-1
6265

@@ -65,7 +68,7 @@ jobs:
6568
runs-on: ubuntu-latest
6669
strategy:
6770
matrix:
68-
php-version: ['8.3', '8.4']
71+
php-version: ['8.2', '8.3', '8.4', '8.5']
6972
fail-fast: false
7073
steps:
7174
- name: "Git: checkout"
@@ -85,4 +88,16 @@ jobs:
8588
run: phpunit --version
8689

8790
- name: "PHPUnit: unit tests"
88-
run: phpunit --testsuite=unit
91+
if: matrix.php-version != env.PHP_STABLE_VERSION
92+
run: phpunit
93+
94+
- name: "PHPUnit: all tests + coverage"
95+
if: matrix.php-version == env.PHP_STABLE_VERSION
96+
run: phpunit --coverage-clover ./coverage.xml
97+
98+
- name: "Codecov: upload coverage"
99+
if: matrix.php-version == env.PHP_STABLE_VERSION
100+
uses: codecov/codecov-action@v5
101+
with:
102+
files: ./coverage.xml
103+
fail_ci_if_error: false

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
],
2929
"require": {
30-
"php": "^8.3"
30+
"php": "^8.2"
3131
},
3232
"require-dev": {
3333
"friendsofphp/php-cs-fixer": "^3.40",

0 commit comments

Comments
 (0)