From 5be3794afcf409de4908965eedb68a0943d8b6de Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 12 Jan 2025 05:37:53 +0100 Subject: [PATCH] Drop support for PHPUnit < 7.5 [1] Adjust CI, README and `composer.json` for the drop of support for PHPUnit < 7.5.0. The 7.5.0 version is a deliberate choice to allow for dropping all PHPUnit 7.x related polyfills. --- .github/workflows/test.yml | 30 ++++++++---------------------- README.md | 4 ++-- composer.json | 2 +- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cefa257..5f642b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,24 +43,23 @@ jobs: include: # Test against a version on the low-end of the PHPUnit versions supported for each PHP version. # Using the Composer `--prefer-lowest` option is, unfortunately, not viable, as - # it would result PHP 7.1 - 7.4 all using PHPUnit 6.4.4, which is not the intention. + # it would result PHP 7.1 - 7.4 all using PHPUnit 7.5.0, which is not the intention. # It also would run into trouble with PHP 8.5.12 being used on PHP 8.0+, while the # 8.5.12 release still contained a bug which makes it incompatible with PHP 8.1+, # even though it officially allows for it. # - # Note: PHPUnit 10 is not supported for the PHPUnit Polyfills 3.x branch, so there are + # Note: PHPUnit 10 is not supported for the PHPUnit Polyfills 4.x branch, so there are # no builds against PHPUnit 10! - php: '7.1' - phpunit: '~6.4.4' + phpunit: '7.5.0' coverage: true experimental: false - php: '7.2' - # - PHPUnit 7.0 seems to have an issue with something related to TestListeners, so using PHPUnit 7.1 instead for "low". - phpunit: '~7.1.0' + phpunit: '~7.5.0' coverage: true experimental: false - php: '7.3' - phpunit: '7.2.7' + phpunit: '7.5.16' coverage: true experimental: false - php: '7.4' @@ -203,27 +202,14 @@ jobs: # and very select other combinations. # This should be sufficient to record the coverage for the PHAR specific code. - # PHPUnit 6 is only supported for PHPUnit 6.4.4-latest on the officially supported PHP versions. + # PHPUnit 7 is only supported for PHPUnit 7.5.0-latest on the officially supported PHP versions. - php: '7.1' - phpunit: '6.4' - - php: '7.1' - phpunit: '6' - - php: '7.2' - phpunit: '6.4' - - php: '7.2' - phpunit: '6' + phpunit: '7.5' coverage: true - - # PHPUnit 7 is fully supported for the officially supported PHP versions. - # Caveats: - # - PHPUnit 7.0 seems to have an issue with something related to TestListeners, so using PHPUnit 7.1 instead for "low". - # - PHPUnit 7 supports PHP 7.3 as of PHPUnit 7.3.0 (for our purposes). - - php: '7.1' - phpunit: '7.1' - php: '7.1' phpunit: '7' - php: '7.3' - phpunit: '7.3' + phpunit: '7.5' - php: '7.3' phpunit: '7' coverage: true diff --git a/README.md b/README.md index 496e9ef..ff8ca0a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Requirements ------------ * PHP 7.1 or higher. -* [PHPUnit] 6.4 - 9.x and 11.x (automatically required via Composer). +* [PHPUnit] 7.5 - 9.x and 11.x (automatically required via Composer). [PHPUnit]: https://packagist.org/packages/phpunit/phpunit @@ -65,7 +65,7 @@ Why use the PHPUnit Polyfills? This library is set up to allow for creating PHPUnit cross-version compatible tests by offering a number of polyfills for functionality which was introduced, split up or renamed in PHPUnit. -### Write your tests for PHPUnit 11.x and run them on PHPUnit 6.4 - 11.x +### Write your tests for PHPUnit 11.x and run them on PHPUnit 7.5 - 11.x The polyfills have been setup to allow tests to be _forward_-compatible. What that means is, that your tests can use the assertions supported by the _latest_ PHPUnit version, even when running on older PHPUnit versions. diff --git a/composer.json b/composer.json index bf0fc76..488db00 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "require": { "php": ">=7.1", - "phpunit/phpunit": "^6.4.4 || ^7.0 || ^8.0 || ^9.0 || ^11.0" + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0 || ^11.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0",