Skip to content

Commit 3b538fb

Browse files
authored
Adjust required PHPUnit requirements and CI setup (#68)
Fixes #66
1 parent 1eec1b4 commit 3b538fb

2 files changed

Lines changed: 11 additions & 33 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
permissions:
1111
contents: read
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
cs:
1519
name: "Code style"
@@ -18,22 +22,18 @@ jobs:
1822
- name: "Git: checkout"
1923
uses: actions/checkout@v4
2024

21-
- name: "PHP: setup 8.3"
25+
- name: "PHP: setup 8.2"
2226
uses: shivammathur/setup-php@v2
2327
with:
24-
php-version: '8.3'
28+
php-version: '8.2'
2529
coverage: none
26-
tools: php-cs-fixer
2730

2831
- name: "Composer: validate"
2932
run: composer validate --strict
3033

3134
- name: "Composer: install"
3235
run: composer install --prefer-dist --no-interaction --no-progress
3336

34-
- name: "Php-CS-Fixer: version"
35-
run: vendor/bin/php-cs-fixer -V
36-
3737
- name: "Php-CS-Fixer: check"
3838
run: vendor/bin/php-cs-fixer fix --diff --dry-run
3939

@@ -48,16 +48,13 @@ jobs:
4848
uses: shivammathur/setup-php@v2
4949
with:
5050
php-version: '8.4'
51-
tools: phpstan
51+
coverage: none
5252

5353
- name: "Composer: install"
5454
run: composer install --prefer-dist --no-interaction --no-progress
5555

56-
- name: "PHPStan: version"
57-
run: phpstan --version
58-
5956
- name: "PHPStan: analyze"
60-
run: phpstan
57+
run: vendor/bin/phpstan
6158

6259
unit-tests:
6360
name: "Unit Tests (PHP ${{ matrix.php-version }})"
@@ -74,14 +71,7 @@ jobs:
7471
uses: shivammathur/setup-php@v2
7572
with:
7673
php-version: ${{ matrix.php-version }}
77-
coverage: pcov
78-
tools: phpunit
79-
80-
# Force PHPUnit 11.5 on PHP 8.2 to keep support for it
81-
# https://phpunit.de/supported-versions.html
82-
- name: "PHPUnit: install 11.5"
83-
if: matrix.php-version == '8.2'
84-
run: composer require --no-update phpunit/phpunit:^11.5
74+
coverage: none
8575

8676
- name: "Composer: install (${{ matrix.dependencies }})"
8777
run: |
@@ -91,11 +81,8 @@ jobs:
9181
composer install --prefer-dist --no-interaction --no-progress
9282
fi
9383
94-
- name: "PHPUnit: version"
95-
run: phpunit --version
96-
9784
- name: "PHPUnit: tests"
98-
run: phpunit --testsuite=unit
85+
run: vendor/bin/phpunit --no-coverage --testsuite=unit
9986

10087
integration-tests:
10188
name: "Integration Tests (PHP ${{ matrix.php-version }} ${{ matrix.dependencies }})"
@@ -121,12 +108,6 @@ jobs:
121108
with:
122109
php-version: ${{ matrix.php-version }}
123110
coverage: pcov
124-
tools: phpunit
125-
126-
# Force PHPUnit 11.5 on PHP 8.2 to keep support for it
127-
# https://phpunit.de/supported-versions.html
128-
- if: matrix.php-version == '8.2'
129-
run: composer require --no-update phpunit/phpunit:^11.5
130111

131112
- name: "Node: setup"
132113
uses: actions/setup-node@v4
@@ -144,9 +125,6 @@ jobs:
144125
- name: "Playwright: install browsers"
145126
run: php bin/playwright-install --browsers
146127

147-
- name: "PHPUnit: version"
148-
run: vendor/bin/phpunit --version
149-
150128
- name: "PHPUnit: all tests with coverage"
151129
run: vendor/bin/phpunit --coverage-clover=coverage.xml
152130

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"friendsofphp/php-cs-fixer": "^3.40",
4141
"monolog/monolog": "^3.9",
4242
"phpstan/phpstan": "^2.1",
43-
"phpunit/phpunit": "^12.3",
43+
"phpunit/phpunit": "^11.5",
4444
"symfony/var-dumper": "^6.4 || ^7.3 || ^8.0"
4545
},
4646
"minimum-stability": "stable",

0 commit comments

Comments
 (0)