Skip to content

Commit 4bf3753

Browse files
authored
Merge pull request #417 from mvorisek/phpunit_9_0_0
Keep full PHPUnit 9.x support
2 parents 3ddec39 + 2f86dfa commit 4bf3753

File tree

7 files changed

+42
-39
lines changed

7 files changed

+42
-39
lines changed

.github/settings.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,34 @@ branches:
2424
- context: "Tests (7.4, 8.5.19, highest)"
2525
- context: "Tests (7.4, 8.5.19, locked)"
2626
- context: "Tests (7.4, 8.5.19, lowest)"
27-
- context: "Tests (7.4, 9.4.3, highest)"
28-
- context: "Tests (7.4, 9.4.3, lowest)"
27+
- context: "Tests (7.4, 9.0.0, highest)"
28+
- context: "Tests (7.4, 9.0.0, lowest)"
2929
- context: "Tests (8.0, 8.5.19, highest)"
3030
- context: "Tests (8.0, 8.5.19, locked)"
3131
- context: "Tests (8.0, 8.5.19, lowest)"
32-
- context: "Tests (8.0, 9.4.3, highest)"
33-
- context: "Tests (8.0, 9.4.3, lowest)"
32+
- context: "Tests (8.0, 9.0.0, highest)"
33+
- context: "Tests (8.0, 9.0.0, lowest)"
3434
- context: "Tests (8.1, 10.0.0, highest)"
3535
- context: "Tests (8.1, 10.0.0, lowest)"
3636
- context: "Tests (8.1, 8.5.19, highest)"
3737
- context: "Tests (8.1, 8.5.19, locked)"
3838
- context: "Tests (8.1, 8.5.19, lowest)"
39-
- context: "Tests (8.1, 9.4.3, highest)"
40-
- context: "Tests (8.1, 9.4.3, lowest)"
39+
- context: "Tests (8.1, 9.0.0, highest)"
40+
- context: "Tests (8.1, 9.0.0, lowest)"
4141
- context: "Tests (8.2, 10.0.0, highest)"
4242
- context: "Tests (8.2, 10.0.0, lowest)"
4343
- context: "Tests (8.2, 8.5.19, highest)"
4444
- context: "Tests (8.2, 8.5.19, locked)"
4545
- context: "Tests (8.2, 8.5.19, lowest)"
46-
- context: "Tests (8.2, 9.4.3, highest)"
47-
- context: "Tests (8.2, 9.4.3, lowest)"
46+
- context: "Tests (8.2, 9.0.0, highest)"
47+
- context: "Tests (8.2, 9.0.0, lowest)"
4848
- context: "Tests (8.3, 10.0.0, highest)"
4949
- context: "Tests (8.3, 10.0.0, lowest)"
5050
- context: "Tests (8.3, 8.5.19, highest)"
5151
- context: "Tests (8.3, 8.5.19, locked)"
5252
- context: "Tests (8.3, 8.5.19, lowest)"
53-
- context: "Tests (8.3, 9.4.3, highest)"
54-
- context: "Tests (8.3, 9.4.3, lowest)"
53+
- context: "Tests (8.3, 9.0.0, highest)"
54+
- context: "Tests (8.3, 9.0.0, lowest)"
5555
strict: false
5656
restrictions:
5757

.github/workflows/integrate.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -474,27 +474,27 @@ jobs:
474474

475475
include:
476476
- php-version: "7.4"
477-
phpunit-version: "9.4.3"
477+
phpunit-version: "9.0.0"
478478
dependencies: "lowest"
479479

480480
- php-version: "7.4"
481-
phpunit-version: "9.4.3"
481+
phpunit-version: "9.0.0"
482482
dependencies: "highest"
483483

484484
- php-version: "8.0"
485-
phpunit-version: "9.4.3"
485+
phpunit-version: "9.0.0"
486486
dependencies: "lowest"
487487

488488
- php-version: "8.0"
489-
phpunit-version: "9.4.3"
489+
phpunit-version: "9.0.0"
490490
dependencies: "highest"
491491

492492
- php-version: "8.1"
493-
phpunit-version: "9.4.3"
493+
phpunit-version: "9.0.0"
494494
dependencies: "lowest"
495495

496496
- php-version: "8.1"
497-
phpunit-version: "9.4.3"
497+
phpunit-version: "9.0.0"
498498
dependencies: "highest"
499499

500500
- php-version: "8.1"
@@ -506,11 +506,11 @@ jobs:
506506
dependencies: "highest"
507507

508508
- php-version: "8.2"
509-
phpunit-version: "9.4.3"
509+
phpunit-version: "9.0.0"
510510
dependencies: "lowest"
511511

512512
- php-version: "8.2"
513-
phpunit-version: "9.4.3"
513+
phpunit-version: "9.0.0"
514514
dependencies: "highest"
515515

516516
- php-version: "8.2"
@@ -522,11 +522,11 @@ jobs:
522522
dependencies: "highest"
523523

524524
- php-version: "8.3"
525-
phpunit-version: "9.4.3"
525+
phpunit-version: "9.0.0"
526526
dependencies: "lowest"
527527

528528
- php-version: "8.3"
529-
phpunit-version: "9.4.3"
529+
phpunit-version: "9.0.0"
530530
dependencies: "highest"
531531

532532
- php-version: "8.3"
@@ -588,12 +588,19 @@ jobs:
588588
if: "matrix.phpunit-version == '8.5.19'"
589589
run: "vendor/bin/phpunit --colors=always --configuration=test/Unit/phpunit.xml"
590590

591+
- name: "Apply patch from https://github.com/sebastianbergmann/phpunit/pull/4486 for phpunit/phpunit:9.0.0"
592+
if: "matrix.php-version == '8.3' && matrix.phpunit-version == '9.0.0' && matrix.dependencies == 'lowest'"
593+
run: |
594+
cd vendor/phpunit/phpunit
595+
wget -O gh-4486.patch https://github.com/sebastianbergmann/phpunit/commit/0a488f22925b3c8732338ef0fbfe7f13cb4cf1d2.patch
596+
patch -p1 < gh-4486.patch
597+
591598
- name: "Run end-to-end tests with phpunit/phpunit:8.5.19"
592599
if: "matrix.phpunit-version == '8.5.19'"
593600
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version8/phpunit.xml"
594601

595-
- name: "Run end-to-end tests with phpunit/phpunit:9.4.3"
596-
if: "matrix.phpunit-version == '9.4.3'"
602+
- name: "Run end-to-end tests with phpunit/phpunit:9.0.0"
603+
if: "matrix.phpunit-version == '9.0.0'"
597604
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version9/phpunit.xml"
598605

599606
- name: "Run end-to-end tests with phpunit/phpunit:10.0.0"

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
For a full diff see [`2.7.0...main`][2.7.0...main].
1010

11-
### Changed
12-
13-
- Tighten version constraints to allow installation with `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.4.3`, and `phpunit/phpunit:^10.0.0` ([#416]), by [@localheinz]
14-
1511
## [`2.7.0`][2.7.0]
1612

1713
For a full diff see [`2.6.0...2.7.0`][2.6.0...2.7.0].

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ tests: ## Runs unit and end-to-end tests with phpunit/phpunit
6262
mkdir -p .build/phpunit
6363
composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^8.5.19 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/phpunit.xml; git checkout HEAD -- composer.json composer.lock
6464
composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^8.5.19 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version8/phpunit.xml; git checkout HEAD -- composer.json composer.lock
65-
composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^9.4.3 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version9/phpunit.xml; git checkout HEAD -- composer.json composer.lock
65+
composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^9.0.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version9/phpunit.xml; git checkout HEAD -- composer.json composer.lock
6666
composer config platform.php --unset; composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^10.0.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version10/phpunit.xml; git checkout HEAD -- composer.json composer.lock
6767

6868
vendor: composer.json composer.lock

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This project provides a [`composer`](https://getcomposer.org) package and a [Pha
1717
The extension is compatible with the following versions of `phpunit/phpunit`:
1818

1919
- [`phpunit/phpunit:^8.5.19`](https://github.com/sebastianbergmann/phpunit/tree/8.5.19)
20-
- [`phpunit/phpunit:^9.4.3`](https://github.com/sebastianbergmann/phpunit/tree/9.4.3)
20+
- [`phpunit/phpunit:^9.0.0`](https://github.com/sebastianbergmann/phpunit/tree/9.0.0)
2121
- [`phpunit/phpunit:^10.0.0`](https://github.com/sebastianbergmann/phpunit/tree/10.0.0)
2222

2323
## Installation
@@ -30,7 +30,7 @@ Run
3030
composer require --dev ergebnis/phpunit-slow-test-detector
3131
```
3232

33-
to install `ergebnis/phpunit-slow-test-detector` as a `composer` package when using `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.4.3`, or `phpunit/phpunit:^10.0.0`.
33+
to install `ergebnis/phpunit-slow-test-detector` as a `composer` package when using `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.0.0`, or `phpunit/phpunit:^10.0.0`.
3434

3535
### Installation as Phar
3636

@@ -63,9 +63,9 @@ To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^
6363
</phpunit>
6464
```
6565

66-
### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^9.4.3`
66+
### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^9.0.0`
6767

68-
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^9.4.3`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/9.6/configuration.html#the-extensions-element):
68+
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^9.0.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/9.6/configuration.html#the-extensions-element):
6969

7070
```diff
7171
<phpunit
@@ -169,9 +169,9 @@ The following example configures the maximum count of slow tests to three, and t
169169
</phpunit>
170170
```
171171

172-
### Configuring the extension when using `phpunit/phpunit:^9.4.3`
172+
### Configuring the extension when using `phpunit/phpunit:^9.0.0`
173173

174-
The following example configures the maximum count of slow tests to three, and the maximum duration for all tests to 250 milliseconds when using `phpunit/phpunit:^9.4.3`:
174+
The following example configures the maximum count of slow tests to three, and the maximum duration for all tests to 250 milliseconds when using `phpunit/phpunit:^9.0.0`:
175175

176176
```diff
177177
<phpunit
@@ -232,8 +232,8 @@ The following example configures the maximum count of slow tests to three, and t
232232
You can configure the maximum duration for a single test case with
233233

234234
- an `Attribute\MaximumDuration` attribute when using `phpunit/phpunit:^10.0.0`
235-
- a `@maximumDuration` annotation in the DocBlock when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.4.3`
236-
- a `@slowThreshold` annotation in the DocBlock when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.4.3`
235+
- a `@maximumDuration` annotation in the DocBlock when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`
236+
- a `@slowThreshold` annotation in the DocBlock when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`
237237

238238
The following example configures the maximum durations for single test cases to 5.000 ms, 4.000 ms, and 3.000 ms:
239239

@@ -316,9 +316,9 @@ Time: 00:12.601, Memory: 8.00 MB
316316
OK (13 tests, 13 assertions)
317317
```
318318

319-
### Understanding measured test durations when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.4.3`
319+
### Understanding measured test durations when using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`
320320

321-
When using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.4.3`, the extension uses the hooks event system of `phpunit/phpunit`.
321+
When using `phpunit/phpunit:^8.5.19` or `phpunit/phpunit:^9.0.0`, the extension uses the hooks event system of `phpunit/phpunit`.
322322

323323
The hooks event system supports eleven hook methods that `phpunit/phpunit` invokes during the execution of tests.
324324

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require": {
2727
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
28-
"phpunit/phpunit": "^8.5.19 || ^9.4.3 || ^10.0.0"
28+
"phpunit/phpunit": "^8.5.19 || ^9.0.0 || ^10.0.0"
2929
},
3030
"require-dev": {
3131
"ergebnis/composer-normalize": "^2.28.3",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)