Skip to content

Commit d94c5ad

Browse files
authored
Merge pull request #448 from ergebnis/fix/phpunit-7
Fix: Require at least `phpunit/phpunit:^7.5.0`
2 parents ca1bc2e + 07da806 commit d94c5ad

File tree

29 files changed

+51
-46
lines changed

29 files changed

+51
-46
lines changed

.github/settings.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ branches:
1414
required_approving_review_count: 1
1515
required_status_checks:
1616
checks:
17-
- context: "Code Coverage (7.2.0, 7.4, highest)"
17+
- context: "Code Coverage (7.5.0, 7.4, highest)"
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.2.0, 7.4, highest)"
25-
- context: "Tests (7.2.0, 7.4, lowest)"
24+
- context: "Tests (7.5.0, 7.4, highest)"
25+
- context: "Tests (7.5.0, 7.4, lowest)"
2626
- context: "Tests (8.5.19, 7.4, highest)"
2727
- context: "Tests (8.5.19, 7.4, lowest)"
2828
- context: "Tests (8.5.19, 8.0, highest)"

.github/workflows/integrate.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
phpunit-version:
22-
- "7.2.0"
22+
- "7.5.0"
2323

2424
php-version:
2525
- "7.4"
@@ -473,11 +473,11 @@ jobs:
473473
- "highest"
474474

475475
include:
476-
- phpunit-version: "7.2.0"
476+
- phpunit-version: "7.5.0"
477477
php-version: "7.4"
478478
dependencies: "lowest"
479479

480-
- phpunit-version: "7.2.0"
480+
- phpunit-version: "7.5.0"
481481
php-version: "7.4"
482482
dependencies: "highest"
483483

@@ -564,8 +564,8 @@ jobs:
564564
with:
565565
dependencies: "${{ matrix.dependencies }}"
566566

567-
- name: "Run unit tests with phpunit/phpunit:7.2.0"
568-
if: "matrix.phpunit-version == '7.2.0'"
567+
- name: "Run unit tests with phpunit/phpunit:7.5.0"
568+
if: "matrix.phpunit-version == '7.5.0'"
569569
run: "vendor/bin/phpunit --colors=always --configuration=test/Unit/phpunit.xml"
570570

571571
- name: "Apply patch from https://github.com/sebastianbergmann/phpunit/pull/4486 for phpunit/phpunit:9.0.0"
@@ -575,8 +575,8 @@ jobs:
575575
wget -O gh-4486.patch https://github.com/sebastianbergmann/phpunit/commit/0a488f22925b3c8732338ef0fbfe7f13cb4cf1d2.patch
576576
patch -p1 < gh-4486.patch
577577
578-
- name: "Run end-to-end tests with phpunit/phpunit:7.2.0"
579-
if: "matrix.phpunit-version == '7.2.0'"
578+
- name: "Run end-to-end tests with phpunit/phpunit:7.5.0"
579+
if: "matrix.phpunit-version == '7.5.0'"
580580
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version07/phpunit.xml"
581581

582582
- name: "Run end-to-end tests with phpunit/phpunit:8.5.19"

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.8.0...main`][2.8.0...main].
1010

11+
### Fixed
12+
13+
- Required at least `phpunit/phpunit:^7.5.0` ([#448]), by [@localheinz]
14+
1115
## [`2.8.0`][2.8.0]
1216

1317
For a full diff see [`2.7.0...2.8.0`][2.7.0...2.8.0].
@@ -248,6 +252,7 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0].
248252
[#394]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/394
249253
[#396]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/396
250254
[#447]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/447
255+
[#448]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/448
251256

252257
[@HypeMC]: https://github.com/HypeMC
253258
[@localheinz]: https://github.com/localheinz

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ static-code-analysis-baseline: vendor ## Generates a baseline for static code an
6161
.PHONY: tests
6262
tests: ## Runs unit and end-to-end tests with phpunit/phpunit
6363
mkdir -p .build/phpunit/
64-
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:^7.2.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/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:^7.2.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version07/phpunit.xml; git checkout HEAD -- composer.json composer.lock
64+
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:^7.5.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/Unit/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:^7.5.0 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version07/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:^8.5.19 --no-interaction --quiet --update-with-all-dependencies; vendor/bin/phpunit --configuration=test/EndToEnd/Version08/phpunit.xml; git checkout HEAD -- composer.json composer.lock
6767
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/Version09/phpunit.xml; git checkout HEAD -- composer.json composer.lock
6868
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

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This project provides a [`composer`](https://getcomposer.org) package and a [Pha
1616

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

19-
- [`phpunit/phpunit:^7.2.0`](https://github.com/sebastianbergmann/phpunit/tree/7.2.0)
19+
- [`phpunit/phpunit:^7.5.0`](https://github.com/sebastianbergmann/phpunit/tree/7.5.0)
2020
- [`phpunit/phpunit:^8.5.19`](https://github.com/sebastianbergmann/phpunit/tree/8.5.19)
2121
- [`phpunit/phpunit:^9.0.0`](https://github.com/sebastianbergmann/phpunit/tree/9.0.0)
2222
- [`phpunit/phpunit:^10.0.0`](https://github.com/sebastianbergmann/phpunit/tree/10.0.0)
@@ -31,7 +31,7 @@ Run
3131
composer require --dev ergebnis/phpunit-slow-test-detector
3232
```
3333

34-
to install `ergebnis/phpunit-slow-test-detector` as a `composer` package when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.0.0`, or `phpunit/phpunit:^10.0.0`.
34+
to install `ergebnis/phpunit-slow-test-detector` as a `composer` package when using `phpunit/phpunit:^7.5.0`, `phpunit/phpunit:^8.5.19`, `phpunit/phpunit:^9.0.0`, or `phpunit/phpunit:^10.0.0`.
3535

3636
### Installation as Phar
3737

@@ -43,9 +43,9 @@ Download `phpunit-slow-test-detector.phar` from the [latest release](https://git
4343

4444
Before the extension can detect slow tests in `phpunit/phpunit`, you need to bootstrap it. The bootstrapping mechanism depends on the version of `phpunit/phpunit` you are using.
4545

46-
### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^7.2.0`
46+
### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^7.5.0`
4747

48-
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^7.2.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/7.5/configuration.html#the-extensions-element):
48+
To bootstrap the extension as a `composer` package when using `phpunit/phpunit:^7.5.0`, adjust your `phpunit.xml` configuration file and configure the [`extensions` element](https://docs.phpunit.de/en/7.5/configuration.html#the-extensions-element):
4949

5050
```diff
5151
<phpunit
@@ -158,9 +158,9 @@ You can configure the extension with the following options in your `phpunit.xml`
158158

159159
The configuration mechanism depends on the version of `phpunit/phpunit` you are using.
160160

161-
### Configuring the extension when using `phpunit/phpunit:^7.2.0`
161+
### Configuring the extension when using `phpunit/phpunit:^7.5.0`
162162

163-
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:^7.2.0`:
163+
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:^7.5.0`:
164164

165165
```diff
166166
<phpunit
@@ -286,8 +286,8 @@ The following example configures the maximum count of slow tests to three, and t
286286
You can configure the maximum duration for a single test case with
287287

288288
- an `Attribute\MaximumDuration` attribute when using `phpunit/phpunit:^10.0.0`
289-
- a `@maximumDuration` annotation in the DocBlock when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
290-
- a `@slowThreshold` annotation in the DocBlock when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
289+
- a `@maximumDuration` annotation in the DocBlock when using `phpunit/phpunit:^7.5.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
290+
- a `@slowThreshold` annotation in the DocBlock when using `phpunit/phpunit:^7.5.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
291291

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

@@ -370,9 +370,9 @@ Time: 00:12.601, Memory: 8.00 MB
370370
OK (13 tests, 13 assertions)
371371
```
372372

373-
### Understanding measured test durations when using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
373+
### Understanding measured test durations when using `phpunit/phpunit:^7.5.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0`
374374

375-
When using `phpunit/phpunit:^7.2.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0` the extension uses the hooks event system of `phpunit/phpunit`.
375+
When using `phpunit/phpunit:^7.5.0`, `phpunit/phpunit:^8.5.19`, or `phpunit/phpunit:^9.0.0` the extension uses the hooks event system of `phpunit/phpunit`.
376376

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

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": "^7.1.0 || ^8.5.19 || ^9.0.0 || ^10.0.0"
28+
"phpunit/phpunit": "^7.5.0 || ^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/Version07/Configuration/Defaults/phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<phpunit
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.2/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
44
beStrictAboutChangesToGlobalState="true"
55
beStrictAboutOutputDuringTests="true"
66
beStrictAboutTestsThatDoNotTestAnything="true"

test/EndToEnd/Version07/Configuration/MaximumCount/phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<phpunit
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.2/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
44
beStrictAboutChangesToGlobalState="true"
55
beStrictAboutOutputDuringTests="true"
66
beStrictAboutTestsThatDoNotTestAnything="true"

test/EndToEnd/Version07/Configuration/MaximumDuration/phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<phpunit
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.2/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
44
beStrictAboutChangesToGlobalState="true"
55
beStrictAboutOutputDuringTests="true"
66
beStrictAboutTestsThatDoNotTestAnything="true"

0 commit comments

Comments
 (0)