Skip to content

Commit 0b8134e

Browse files
authored
Merge pull request ergebnis#395 from ergebnis/feature/constraint
Enhancement: Widen version constraints
2 parents 8f4dfad + a688179 commit 0b8134e

File tree

20 files changed

+103
-98
lines changed

20 files changed

+103
-98
lines changed

.github/settings.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,52 @@ branches:
1414
required_approving_review_count: 1
1515
required_status_checks:
1616
checks:
17-
- context: "Code Coverage (7.4, 8.5.36, locked)"
17+
- context: "Code Coverage (7.4, 8.5.19, locked)"
1818
- context: "Coding Standards (7.4, locked)"
1919
- context: "Compile Phar (8.1, locked)"
2020
- context: "Dependency Analysis (7.4, locked)"
2121
- context: "Refactoring (7.4, locked)"
2222
- context: "Security Analysis (7.4, locked)"
2323
- context: "Static Code Analysis (7.4, locked)"
24-
- context: "Tests (7.4, 8.5.36, highest)"
25-
- context: "Tests (7.4, 8.5.36, highest)"
26-
- context: "Tests (7.4, 8.5.36, locked)"
27-
- context: "Tests (7.4, 8.5.36, locked)"
28-
- context: "Tests (7.4, 8.5.36, lowest)"
29-
- context: "Tests (7.4, 8.5.36, lowest)"
30-
- context: "Tests (8.0, 8.5.36, highest)"
31-
- context: "Tests (8.0, 8.5.36, highest)"
32-
- context: "Tests (8.0, 8.5.36, locked)"
33-
- context: "Tests (8.0, 8.5.36, locked)"
34-
- context: "Tests (8.0, 8.5.36, lowest)"
35-
- context: "Tests (8.0, 8.5.36, lowest)"
36-
- context: "Tests (8.1, 10.4.0, highest)"
37-
- context: "Tests (8.1, 10.4.0, locked)"
38-
- context: "Tests (8.1, 10.4.0, lowest)"
39-
- context: "Tests (8.1, 8.5.36, highest)"
40-
- context: "Tests (8.1, 8.5.36, locked)"
41-
- context: "Tests (8.1, 8.5.36, lowest)"
42-
- context: "Tests (8.1, 9.6.0, highest)"
43-
- context: "Tests (8.1, 9.6.0, locked)"
44-
- context: "Tests (8.1, 9.6.0, lowest)"
45-
- context: "Tests (8.2, 10.4.0, highest)"
46-
- context: "Tests (8.2, 10.4.0, locked)"
47-
- context: "Tests (8.2, 10.4.0, lowest)"
48-
- context: "Tests (8.2, 8.5.36, highest)"
49-
- context: "Tests (8.2, 8.5.36, locked)"
50-
- context: "Tests (8.2, 8.5.36, lowest)"
51-
- context: "Tests (8.2, 9.6.0, highest)"
52-
- context: "Tests (8.2, 9.6.0, locked)"
53-
- context: "Tests (8.2, 9.6.0, lowest)"
54-
- context: "Tests (8.3, 10.4.0, highest)"
55-
- context: "Tests (8.3, 10.4.0, locked)"
56-
- context: "Tests (8.3, 10.4.0, lowest)"
57-
- context: "Tests (8.3, 8.5.36, highest)"
58-
- context: "Tests (8.3, 8.5.36, locked)"
59-
- context: "Tests (8.3, 8.5.36, lowest)"
60-
- context: "Tests (8.3, 9.6.0, highest)"
61-
- context: "Tests (8.3, 9.6.0, locked)"
62-
- context: "Tests (8.3, 9.6.0, lowest)"
24+
- context: "Tests (7.4, 8.5.19, highest)"
25+
- context: "Tests (7.4, 8.5.19, highest)"
26+
- context: "Tests (7.4, 8.5.19, locked)"
27+
- context: "Tests (7.4, 8.5.19, locked)"
28+
- context: "Tests (7.4, 8.5.19, lowest)"
29+
- context: "Tests (7.4, 8.5.19, lowest)"
30+
- context: "Tests (8.0, 8.5.19, highest)"
31+
- context: "Tests (8.0, 8.5.19, highest)"
32+
- context: "Tests (8.0, 8.5.19, locked)"
33+
- context: "Tests (8.0, 8.5.19, locked)"
34+
- context: "Tests (8.0, 8.5.19, lowest)"
35+
- context: "Tests (8.0, 8.5.19, lowest)"
36+
- context: "Tests (8.1, 10.0.0, highest)"
37+
- context: "Tests (8.1, 10.0.0, locked)"
38+
- context: "Tests (8.1, 10.0.0, lowest)"
39+
- context: "Tests (8.1, 8.5.19, highest)"
40+
- context: "Tests (8.1, 8.5.19, locked)"
41+
- context: "Tests (8.1, 8.5.19, lowest)"
42+
- context: "Tests (8.1, 9.0.0, highest)"
43+
- context: "Tests (8.1, 9.0.0, locked)"
44+
- context: "Tests (8.1, 9.0.0, lowest)"
45+
- context: "Tests (8.2, 10.0.0, highest)"
46+
- context: "Tests (8.2, 10.0.0, locked)"
47+
- context: "Tests (8.2, 10.0.0, lowest)"
48+
- context: "Tests (8.2, 8.5.19, highest)"
49+
- context: "Tests (8.2, 8.5.19, locked)"
50+
- context: "Tests (8.2, 8.5.19, lowest)"
51+
- context: "Tests (8.2, 9.0.0, highest)"
52+
- context: "Tests (8.2, 9.0.0, locked)"
53+
- context: "Tests (8.2, 9.0.0, lowest)"
54+
- context: "Tests (8.3, 10.0.0, highest)"
55+
- context: "Tests (8.3, 10.0.0, locked)"
56+
- context: "Tests (8.3, 10.0.0, lowest)"
57+
- context: "Tests (8.3, 8.5.19, highest)"
58+
- context: "Tests (8.3, 8.5.19, locked)"
59+
- context: "Tests (8.3, 8.5.19, lowest)"
60+
- context: "Tests (8.3, 9.0.0, highest)"
61+
- context: "Tests (8.3, 9.0.0, locked)"
62+
- context: "Tests (8.3, 9.0.0, lowest)"
6363
strict: false
6464
restrictions:
6565

.github/workflows/integrate.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- "7.4"
2323

2424
phpunit-version:
25-
- "8.5.36"
25+
- "8.5.19"
2626

2727
dependencies:
2828
- "locked"
@@ -465,8 +465,8 @@ jobs:
465465
- "8.3"
466466

467467
phpunit-version:
468-
- "8.5.36"
469-
- "9.6.0"
468+
- "8.5.19"
469+
- "9.0.0"
470470

471471
dependencies:
472472
- "lowest"
@@ -475,39 +475,39 @@ jobs:
475475

476476
include:
477477
- php-version: "8.1"
478-
phpunit-version: "10.4.0"
478+
phpunit-version: "10.0.0"
479479
dependencies: "lowest"
480480

481481
- php-version: "8.1"
482-
phpunit-version: "10.4.0"
482+
phpunit-version: "10.0.0"
483483
dependencies: "locked"
484484

485485
- php-version: "8.1"
486-
phpunit-version: "10.4.0"
486+
phpunit-version: "10.0.0"
487487
dependencies: "highest"
488488

489489
- php-version: "8.2"
490-
phpunit-version: "10.4.0"
490+
phpunit-version: "10.0.0"
491491
dependencies: "lowest"
492492

493493
- php-version: "8.2"
494-
phpunit-version: "10.4.0"
494+
phpunit-version: "10.0.0"
495495
dependencies: "locked"
496496

497497
- php-version: "8.2"
498-
phpunit-version: "10.4.0"
498+
phpunit-version: "10.0.0"
499499
dependencies: "highest"
500500

501501
- php-version: "8.3"
502-
phpunit-version: "10.4.0"
502+
phpunit-version: "10.0.0"
503503
dependencies: "lowest"
504504

505505
- php-version: "8.3"
506-
phpunit-version: "10.4.0"
506+
phpunit-version: "10.0.0"
507507
dependencies: "locked"
508508

509509
- php-version: "8.3"
510-
phpunit-version: "10.4.0"
510+
phpunit-version: "10.0.0"
511511
dependencies: "highest"
512512

513513
steps:
@@ -551,18 +551,18 @@ jobs:
551551
with:
552552
dependencies: "${{ matrix.dependencies }}"
553553

554-
- name: "Run unit tests with phpunit/phpunit:9.6.0"
555-
if: "matrix.phpunit-version == '9.6.0'"
554+
- name: "Run unit tests with phpunit/phpunit:9.0.0"
555+
if: "matrix.phpunit-version == '9.0.0'"
556556
run: "vendor/bin/phpunit --colors=always --configuration=test/Unit/phpunit.xml"
557557

558-
- name: "Run end-to-end tests with phpunit/phpunit:8.5.36"
559-
if: "matrix.phpunit-version == '8.5.36'"
558+
- name: "Run end-to-end tests with phpunit/phpunit:8.5.19"
559+
if: "matrix.phpunit-version == '8.5.19'"
560560
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version8/phpunit.xml"
561561

562-
- name: "Run end-to-end tests with phpunit/phpunit:9.6.0"
563-
if: "matrix.phpunit-version == '9.6.0'"
562+
- name: "Run end-to-end tests with phpunit/phpunit:9.0.0"
563+
if: "matrix.phpunit-version == '9.0.0'"
564564
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version9/phpunit.xml"
565565

566-
- name: "Run end-to-end tests with phpunit/phpunit:10.4.0"
567-
if: "matrix.phpunit-version == '10.4.0'"
566+
- name: "Run end-to-end tests with phpunit/phpunit:10.0.0"
567+
if: "matrix.phpunit-version == '10.0.0'"
568568
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version10/phpunit.xml"

CHANGELOG.md

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

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

11+
### Changed
12+
13+
- Widened version constraints to allow installation with `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.0.0`, and `phpunit/phpunit:^10.0.0` ([#396]), by [@localheinz]
14+
1115
## [`2.6.0`][2.6.0]
1216

1317
For a full diff see [`2.5.0...2.6.0`][2.5.0...2.6.0].
@@ -226,6 +230,7 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0].
226230
[#390]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/390
227231
[#393]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/393
228232
[#394]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/394
233+
[#396]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/396
229234

230235
[@HypeMC]: https://github.com/HypeMC
231236
[@localheinz]: https://github.com/localheinz

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ it: refactoring coding-standards security-analysis static-code-analysis tests ##
44
.PHONY: code-coverage
55
code-coverage: ## Collects coverage from running unit tests with phpunit/phpunit
66
mkdir -p .build/phpunit/
7-
composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^8.5.36 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-text; git checkout HEAD -- composer.json composer.lock
7+
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 --coverage-text; git checkout HEAD -- composer.json composer.lock
88

99
.PHONY: coding-standards
1010
coding-standards: vendor ## Lints YAML files with yamllint, normalizes composer.json with ergebnis/composer-normalize, and fixes code style issues with friendsofphp/php-cs-fixer
@@ -60,10 +60,10 @@ static-code-analysis-baseline: vendor ## Generates a baseline for static code an
6060
.PHONY: tests
6161
tests: ## Runs unit and end-to-end tests with phpunit/phpunit
6262
mkdir -p .build/phpunit
63-
composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^8.5.36 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/phpunit.xml; git checkout HEAD -- composer.json composer.lock
64-
composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^8.5.36 --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 remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^9.6.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version9/phpunit.xml; git checkout HEAD -- composer.json composer.lock
66-
composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --dev --no-interaction --no-progress; composer require phpunit/phpunit:^10.4.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version10/phpunit.xml; git checkout HEAD -- composer.json composer.lock
63+
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
64+
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 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
66+
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
6969
composer validate --strict

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This package provides an extension for detecting slow tests in [`phpunit/phpunit
1616

1717
The extension is compatible with the following versions of `phpunit/phpunit`:
1818

19-
- [`phpunit/phpunit:^8.5.36`](https://github.com/sebastianbergmann/phpunit/tree/8.5.36)
20-
- [`phpunit/phpunit:^9.6.0`](https://github.com/sebastianbergmann/phpunit/tree/9.6.0)
21-
- [`phpunit/phpunit:^10.4.0`](https://github.com/sebastianbergmann/phpunit/tree/10.4.0)
19+
- [`phpunit/phpunit:^8.5.19`](https://github.com/sebastianbergmann/phpunit/tree/8.5.19)
20+
- [`phpunit/phpunit:^9.0.0`](https://github.com/sebastianbergmann/phpunit/tree/9.0.0)
21+
- [`phpunit/phpunit:^10.0.0`](https://github.com/sebastianbergmann/phpunit/tree/10.0.0)
2222

2323
## Installation
2424

@@ -40,7 +40,7 @@ Download `phpunit-slow-test-detector.phar` from the [latest release](https://git
4040

4141
### Bootstrapping the extension as a `composer` package
4242

43-
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^8.5.14` or `phpunit/phpunit:^9.6.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/9.6/configuration.html#the-extensions-element):
43+
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^8.5.19` or `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):
4444

4545
```diff
4646
<phpunit
@@ -59,7 +59,7 @@ To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^
5959
</phpunit>
6060
```
6161

62-
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^10.4.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/10.4/configuration.html#the-extensions-element):
62+
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^10.0.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/10.4/configuration.html#the-extensions-element):
6363

6464
```diff
6565
<phpunit
@@ -80,7 +80,7 @@ To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^
8080

8181
### Bootstrapping the extension as a PHAR
8282

83-
To bootstrap the extension as a PHAR when using `phpunit/phpunit:^10.4.0`, adjust your `phpunit.xml` configuration file and configure the [`extensionsDirectory` attribute](https://docs.phpunit.de/en/10.4/configuration.html#the-extensionsdirectory-attribute) of the [`<phpunit>` element](https://docs.phpunit.de/en/10.4/configuration.html#the-phpunit-element):
83+
To bootstrap the extension as a PHAR when using `phpunit/phpunit:^10.0.0`, adjust your `phpunit.xml` configuration file and configure the [`extensionsDirectory` attribute](https://docs.phpunit.de/en/10.4/configuration.html#the-extensionsdirectory-attribute) of the [`<phpunit>` element](https://docs.phpunit.de/en/10.4/configuration.html#the-phpunit-element):
8484

8585
```diff
8686
<phpunit
@@ -107,7 +107,7 @@ You can configure the extension with the following parameters in your `phpunit.x
107107
- `maximum-count`, an `int`, the maximum count of slow test that should be listed, defaults to `10`
108108
- `maximum-duration`, an `int`, the maximum duration in milliseconds for all tests, defaults to `500`
109109

110-
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:^10.4.0`:
110+
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:^10.0.0`:
111111

112112
```diff
113113
<phpunit
@@ -130,7 +130,7 @@ The following example configures the maximum count of slow tests to three, and t
130130
</phpunit>
131131
```
132132

133-
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:^8.5.0` or `phpunit/phpunit:^9.6.0`:
133+
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:^8.5.19` or `phpunit/phpunit:^9.0.0`:
134134

135135
```diff
136136
<phpunit
@@ -218,7 +218,7 @@ vendor/bin/phpunit
218218
When the extension has detected slow tests, it will report them:
219219

220220
```txt
221-
PHPUnit 10.4.0 by Sebastian Bergmann and contributors.
221+
PHPUnit 10.0.0 by Sebastian Bergmann and contributors.
222222
223223
Runtime: PHP 8.1.0
224224
Configuration: test/EndToEnd/Default/phpunit.xml

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.36 || ^9.6.0 || ^10.4.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.

test/EndToEnd/Version10/DefaultConfiguration/test.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ $application = new TextUI\Application();
1515

1616
$application->run($_SERVER['argv']);
1717
--EXPECTF--
18-
PHPUnit %s by Sebastian Bergmann and contributors.
18+
PHPUnit %s
1919

2020
Runtime: %s
2121
Configuration: %Stest/EndToEnd/Version10/DefaultConfiguration/phpunit.xml
22-
Random Seed: %s
22+
Random %seed: %s
2323

2424
............ 12 / 12 (100%)
2525

test/EndToEnd/Version10/MaximumCount/Three/test.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ $application = new TextUI\Application();
1515

1616
$application->run($_SERVER['argv']);
1717
--EXPECTF--
18-
PHPUnit %s by Sebastian Bergmann and contributors.
18+
PHPUnit %s
1919

2020
Runtime: %s
2121
Configuration: %Stest/EndToEnd/Version10/MaximumCount/Three/phpunit.xml
22-
Random Seed: %s
22+
Random %seed: %s
2323

2424
..... 5 / 5 (100%)
2525

test/EndToEnd/Version10/MaximumDuration/Fifty/test.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ $application = new TextUI\Application();
1515

1616
$application->run($_SERVER['argv']);
1717
--EXPECTF--
18-
PHPUnit %s by Sebastian Bergmann and contributors.
18+
PHPUnit %s
1919

2020
Runtime: %s
2121
Configuration: %Stest/EndToEnd/Version10/MaximumDuration/Fifty/phpunit.xml
22-
Random Seed: %s
22+
Random %seed: %s
2323

2424
............. 13 / 13 (100%)
2525

0 commit comments

Comments
 (0)