Skip to content

Commit b52374d

Browse files
author
Carlos Garcia
committed
Fix PHPUnit compatibility with different PHP versions
1 parent b992479 commit b52374d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ jobs:
1212
strategy:
1313
matrix:
1414
php-versions: ['8.0', '8.1', '8.2', '8.3']
15+
include:
16+
- php-versions: '8.0'
17+
phpunit-version: '^9.6'
18+
- php-versions: '8.1'
19+
phpunit-version: '^10.5'
20+
- php-versions: '8.2'
21+
phpunit-version: '^10.5'
22+
- php-versions: '8.3'
23+
phpunit-version: '^12.0'
1524
fail-fast: false
1625

1726
name: PHP ${{ matrix.php-versions }} Test
@@ -39,6 +48,7 @@ jobs:
3948
4049
- name: Install dependencies
4150
run: |
51+
composer require --no-update phpunit/phpunit ${{ matrix.phpunit-version }}
4252
composer update --no-interaction --prefer-dist
4353
composer install --prefer-dist --no-progress
4454

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
"bin": ["bin/fsmaker"],
2525
"version": "1.4.2",
2626
"require-dev": {
27-
"phpunit/phpunit": "^12"
27+
"phpunit/phpunit": "^9.6 || ^10.5 || ^11.0 || ^12.0"
2828
}
2929
}

0 commit comments

Comments
 (0)