From 07da8067c945f414c8d6d0b2f06617dbf158af00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 23 Dec 2023 15:12:01 +0100 Subject: [PATCH] Fix: Require at least phpunit/phpunit:^7.5.0 --- .github/settings.yml | 6 +++--- .github/workflows/integrate.yaml | 14 ++++++------- CHANGELOG.md | 5 +++++ Makefile | 4 ++-- README.md | 20 +++++++++---------- composer.json | 2 +- composer.lock | 2 +- .../Configuration/Defaults/phpunit.xml | 2 +- .../Configuration/MaximumCount/phpunit.xml | 2 +- .../Configuration/MaximumDuration/phpunit.xml | 2 +- .../Version07/TestCase/Bare/phpunit.xml | 2 +- .../TestCase/Combination/phpunit.xml | 2 +- .../TestCase/WithAfterAnnotation/phpunit.xml | 2 +- .../WithAfterClassAnnotation/phpunit.xml | 2 +- .../WithAssertPostConditions/phpunit.xml | 2 +- .../WithAssertPreConditions/phpunit.xml | 2 +- .../TestCase/WithBeforeAnnotation/phpunit.xml | 2 +- .../WithBeforeClassAnnotation/phpunit.xml | 2 +- .../TestCase/WithDataProvider/phpunit.xml | 2 +- .../Version07/TestCase/WithSetUp/phpunit.xml | 2 +- .../TestCase/WithSetUpBeforeClass/phpunit.xml | 2 +- .../TestCase/WithTearDown/phpunit.xml | 2 +- .../WithTearDownAfterClass/phpunit.xml | 2 +- .../phpunit.xml | 2 +- .../WithMaximumDurationAnnotation/phpunit.xml | 2 +- .../phpunit.xml | 2 +- .../test.phpt | 2 +- .../phpunit.xml | 2 +- .../WithSlowThresholdAnnotation/phpunit.xml | 2 +- 29 files changed, 51 insertions(+), 46 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index a14325d0..057e1e70 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -14,15 +14,15 @@ branches: required_approving_review_count: 1 required_status_checks: checks: - - context: "Code Coverage (7.2.0, 7.4, highest)" + - context: "Code Coverage (7.5.0, 7.4, highest)" - context: "Coding Standards (7.4, locked)" - context: "Compile Phar (8.1, locked)" - context: "Dependency Analysis (7.4, locked)" - context: "Refactoring (7.4, locked)" - context: "Security Analysis (7.4, locked)" - context: "Static Code Analysis (7.4, locked)" - - context: "Tests (7.2.0, 7.4, highest)" - - context: "Tests (7.2.0, 7.4, lowest)" + - context: "Tests (7.5.0, 7.4, highest)" + - context: "Tests (7.5.0, 7.4, lowest)" - context: "Tests (8.5.19, 7.4, highest)" - context: "Tests (8.5.19, 7.4, lowest)" - context: "Tests (8.5.19, 8.0, highest)" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index f564b56a..b8081dbe 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: phpunit-version: - - "7.2.0" + - "7.5.0" php-version: - "7.4" @@ -473,11 +473,11 @@ jobs: - "highest" include: - - phpunit-version: "7.2.0" + - phpunit-version: "7.5.0" php-version: "7.4" dependencies: "lowest" - - phpunit-version: "7.2.0" + - phpunit-version: "7.5.0" php-version: "7.4" dependencies: "highest" @@ -564,8 +564,8 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - name: "Run unit tests with phpunit/phpunit:7.2.0" - if: "matrix.phpunit-version == '7.2.0'" + - name: "Run unit tests with phpunit/phpunit:7.5.0" + if: "matrix.phpunit-version == '7.5.0'" run: "vendor/bin/phpunit --colors=always --configuration=test/Unit/phpunit.xml" - name: "Apply patch from https://github.com/sebastianbergmann/phpunit/pull/4486 for phpunit/phpunit:9.0.0" @@ -575,8 +575,8 @@ jobs: wget -O gh-4486.patch https://github.com/sebastianbergmann/phpunit/commit/0a488f22925b3c8732338ef0fbfe7f13cb4cf1d2.patch patch -p1 < gh-4486.patch - - name: "Run end-to-end tests with phpunit/phpunit:7.2.0" - if: "matrix.phpunit-version == '7.2.0'" + - name: "Run end-to-end tests with phpunit/phpunit:7.5.0" + if: "matrix.phpunit-version == '7.5.0'" run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version07/phpunit.xml" - name: "Run end-to-end tests with phpunit/phpunit:8.5.19" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fa65e32..1646e3e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`2.8.0...main`][2.8.0...main]. +### Fixed + +- Required at least `phpunit/phpunit:^7.5.0` ([#448]), by [@localheinz] + ## [`2.8.0`][2.8.0] 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]. [#394]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/394 [#396]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/396 [#447]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/447 +[#448]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/448 [@HypeMC]: https://github.com/HypeMC [@localheinz]: https://github.com/localheinz diff --git a/Makefile b/Makefile index b243ce43..261b8346 100644 --- a/Makefile +++ b/Makefile @@ -61,8 +61,8 @@ static-code-analysis-baseline: vendor ## Generates a baseline for static code an .PHONY: tests tests: ## Runs unit and end-to-end tests with phpunit/phpunit mkdir -p .build/phpunit/ - 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 - 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 + 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 + 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 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 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 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 diff --git a/README.md b/README.md index c2b73875..40007c09 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This project provides a [`composer`](https://getcomposer.org) package and a [Pha The extension is compatible with the following versions of `phpunit/phpunit`: -- [`phpunit/phpunit:^7.2.0`](https://github.com/sebastianbergmann/phpunit/tree/7.2.0) +- [`phpunit/phpunit:^7.5.0`](https://github.com/sebastianbergmann/phpunit/tree/7.5.0) - [`phpunit/phpunit:^8.5.19`](https://github.com/sebastianbergmann/phpunit/tree/8.5.19) - [`phpunit/phpunit:^9.0.0`](https://github.com/sebastianbergmann/phpunit/tree/9.0.0) - [`phpunit/phpunit:^10.0.0`](https://github.com/sebastianbergmann/phpunit/tree/10.0.0) @@ -31,7 +31,7 @@ Run composer require --dev ergebnis/phpunit-slow-test-detector ``` -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`. +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`. ### Installation as Phar @@ -43,9 +43,9 @@ Download `phpunit-slow-test-detector.phar` from the [latest release](https://git 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. -### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^7.2.0` +### Bootstrapping the extension as a `composer` package when using `phpunit/phpunit:^7.5.0` -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): +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): ```diff