From 323dff9f0a5ae76f021714ed36013f88c93d3cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 7 Apr 2024 18:26:20 +0200 Subject: [PATCH] Enhancement: Add support for PHP 7.1 --- .github/settings.yml | 2 ++ .github/workflows/integrate.yaml | 7 ++++--- .github/workflows/release.yaml | 2 +- .php-cs-fixer.php | 2 +- CHANGELOG.md | 5 +++++ composer.json | 2 +- composer.lock | 4 ++-- rector.php | 2 +- 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 37a05a84..5a160c8e 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -21,6 +21,8 @@ branches: - context: "Refactoring (7.4, locked)" - context: "Security Analysis (7.4, locked)" - context: "Static Code Analysis (7.4, locked)" + - context: "Tests (7.5.0, 7.1, highest)" + - context: "Tests (7.5.0, 7.1, lowest)" - context: "Tests (7.5.0, 7.2, highest)" - context: "Tests (7.5.0, 7.2, lowest)" - context: "Tests (7.5.0, 7.3, highest)" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index c1e72724..538ae3e0 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -58,7 +58,7 @@ jobs: restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - name: "Remove incompatible dependencies with composer" - run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress" + run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit rector/rector vimeo/psalm --ansi --dev --no-interaction --no-progress" - name: "Require phpunit/phpunit:^${{ matrix.phpunit-version }}" run: "composer require phpunit/phpunit:^${{ matrix.phpunit-version }} --ansi --no-interaction --no-progress --update-with-all-dependencies" @@ -249,7 +249,7 @@ jobs: restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - name: "Remove incompatible dependencies with composer" - run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress" + run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit rector/rector vimeo/psalm --ansi --dev --no-interaction --no-progress" - name: "Remove phpunit/phpunit with composer" run: "composer remove phpunit/phpunit --ansi --no-interaction --ignore-platform-reqs --no-progress" @@ -460,6 +460,7 @@ jobs: - "7.5.0" php-version: + - "7.1" - "7.2" - "7.3" - "7.4" @@ -648,7 +649,7 @@ jobs: - name: "Remove incompatible dependencies with composer" if: "matrix.dependencies != 'locked'" - run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress" + run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit rector/rector vimeo/psalm --ansi --dev --no-interaction --no-progress" - name: "Remove platform configuration with composer" if: "matrix.dependencies != 'locked'" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5755db62..4886319e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,7 +56,7 @@ jobs: restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" - name: "Remove incompatible dependencies with composer" - run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress" + run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit rector/rector vimeo/psalm --ansi --dev --no-interaction --no-progress" - name: "Remove phpunit/phpunit with composer" run: "composer remove phpunit/phpunit --ansi --no-interaction --ignore-platform-reqs --no-progress" diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 5c38171a..846083a3 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -26,7 +26,7 @@ $license->save(); -$ruleSet = PhpCsFixer\Config\RuleSet\Php72::create() +$ruleSet = PhpCsFixer\Config\RuleSet\Php71::create() ->withHeader($license->header()) ->withRules(PhpCsFixer\Config\Rules::fromArray([ 'mb_str_functions' => false, diff --git a/CHANGELOG.md b/CHANGELOG.md index ded24a79..1c6de13a 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.12.0...main`][2.12.0...main]. +### Changed + +- Added support for PHP 7.1 ([#532]), by [@localheinz] + ## [`2.12.0`][2.12.0] For a full diff see [`2.11.0...2.12.0`][2.11.0...2.12.0]. @@ -302,6 +306,7 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0]. [#494]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/494 [#495]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/495 [#531]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/531 +[#532]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/532 [@HypeMC]: https://github.com/HypeMC [@localheinz]: https://github.com/localheinz diff --git a/composer.json b/composer.json index 715d1e81..1c14fabd 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "security": "https://github.com/ergebnis/phpunit-slow-test-detector/blob/main/.github/SECURITY.md" }, "require": { - "php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "phpunit/phpunit": "^7.5.0 || ^8.5.19 || ^9.0.0 || ^10.0.0 || ^11.0.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 8ee242dc..c2f1d229 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "36edfea5c4debe50cb7a9fabf2bfc285", + "content-hash": "532b3d0eb880e2831a0e4c3257929436", "packages": [ { "name": "doctrine/instantiator", @@ -5566,7 +5566,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" }, "platform-dev": [], "platform-overrides": { diff --git a/rector.php b/rector.php index 323c7578..e267ff1e 100644 --- a/rector.php +++ b/rector.php @@ -23,5 +23,5 @@ __DIR__ . '/test/', ]); - $rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_72); + $rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_71); };