Skip to content

Commit a048521

Browse files
chore: change phpunit version according to php
1 parent 3472e1e commit a048521

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
- '8.1'
2222
- '8.2'
2323
- '8.3'
24+
include:
25+
- php: '7.2'
26+
phpunit: '"^7||^8"'
2427

2528
steps:
2629
- name: Set up PHP
@@ -33,6 +36,9 @@ jobs:
3336
- name: Checkout code
3437
uses: actions/checkout@v2
3538

39+
- name: "Install specific version of phpunit "
40+
if: ${{ matrix.phpunit }}
41+
run: composer require --no-interaction --no-progress --no-suggest phpunit/phpunit:${{ matrix.phpunit }}
3642

3743
- name: "Install lowest dependencies"
3844
if: ${{ matrix.dependencies == 'lowest' }}
@@ -49,6 +55,13 @@ jobs:
4955
name: Codestyle check on PHP 7.2
5056
runs-on: ubuntu-latest
5157

58+
strategy:
59+
matrix:
60+
php:
61+
- '7.2'
62+
phpunit:
63+
- '"^7||^8"'
64+
5265
steps:
5366
- name: Set up PHP
5467
uses: shivammathur/setup-php@2.1.0
@@ -58,6 +71,10 @@ jobs:
5871
- name: Checkout code
5972
uses: actions/checkout@v2
6073

74+
- name: "Install specific version of phpunit "
75+
if: ${{ matrix.phpunit }}
76+
run: composer require --no-interaction --no-progress --no-suggest phpunit/phpunit:${{ matrix.phpunit }}
77+
6178
- name: Download dependencies
6279
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
6380

@@ -72,6 +89,8 @@ jobs:
7289
matrix:
7390
php:
7491
- '7.2'
92+
phpunit:
93+
- '"^7||^8"'
7594

7695
steps:
7796
- name: Set up PHP
@@ -82,6 +101,10 @@ jobs:
82101
- name: Checkout code
83102
uses: actions/checkout@v2
84103

104+
- name: "Install specific version of phpunit "
105+
if: ${{ matrix.phpunit }}
106+
run: composer require --no-interaction --no-progress --no-suggest phpunit/phpunit:${{ matrix.phpunit }}
107+
85108
- name: Download dependencies
86109
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
87110

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"phpstan/phpstan": "^1",
4242
"phpstan/phpstan-phpunit": "^1",
4343
"phpstan/phpstan-webmozart-assert": "^1",
44-
"phpunit/phpunit": "^7 || ^8 || ^9",
44+
"phpunit/phpunit": "^9",
4545
"symfony/cache": "^5.1"
4646
},
4747
"config": {

0 commit comments

Comments
 (0)