From 2c2044b36bea96e144c052801fa6201db0ac73ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 28 Nov 2022 16:24:41 +0100 Subject: [PATCH] Fix: Drop support for PHP 7.4 --- .github/settings.yml | 13 +++++-------- .github/workflows/integrate.yaml | 11 +++++------ .github/workflows/renew.yaml | 2 +- CHANGELOG.md | 5 +++++ composer.json | 4 ++-- composer.lock | 6 +++--- infection.json | 4 ++-- src/Constructs.php | 10 +--------- 8 files changed, 24 insertions(+), 31 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 10ad19fc..1e0de2f9 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -14,14 +14,11 @@ branches: required_approving_review_count: 1 required_status_checks: contexts: - - "Code Coverage (7.4, locked)" - - "Coding Standards (7.4, locked)" - - "Dependency Analysis (7.4, locked)" - - "Mutation Tests (7.4, locked)" - - "Static Code Analysis (7.4, locked)" - - "Tests (7.4, highest)" - - "Tests (7.4, locked)" - - "Tests (7.4, lowest)" + - "Code Coverage (8.0, locked)" + - "Coding Standards (8.0, locked)" + - "Dependency Analysis (8.0, locked)" + - "Mutation Tests (8.0, locked)" + - "Static Code Analysis (8.0, locked)" - "Tests (8.0, highest)" - "Tests (8.0, locked)" - "Tests (8.0, lowest)" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index c5ba907e..883a3292 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" dependencies: - "locked" @@ -73,7 +73,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" dependencies: - "locked" @@ -141,7 +141,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" dependencies: - "locked" @@ -186,7 +186,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" dependencies: - "locked" @@ -233,7 +233,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" dependencies: - "locked" @@ -281,7 +281,6 @@ jobs: strategy: matrix: php-version: - - "7.4" - "8.0" - "8.1" diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index bdff5b23..af3dd5d8 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "8.0" dependencies: - "locked" diff --git a/CHANGELOG.md b/CHANGELOG.md index eee5adfb..8d18a8be 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 [`1.3.0...main`][1.3.0...main]. +### Changed + +- Dropped support for PHP 7.4 ([#619]), by [@localheinz] + ## [`1.3.0`][1.3.0] For a full diff see [`1.2.0...1.3.0`][1.2.0...1.3.0]. @@ -147,6 +151,7 @@ For a full diff see [`0.4.0...0.5.0`][0.4.0...0.5.0]. [#478]: https://github.com/ergebnis/classy/pull/478 [#481]: https://github.com/ergebnis/classy/pull/481 [#486]: https://github.com/ergebnis/classy/pull/486 +[#619]: https://github.com/ergebnis/classy/pull/619 [@ergebnis]: https://github.com/ergebnis [@localheinz]: https://github.com/localheinz diff --git a/composer.json b/composer.json index 54bfea42..c1893bc0 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/ergebnis/classy" }, "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-tokenizer": "*" }, "require-dev": { @@ -56,7 +56,7 @@ "infection/extension-installer": true }, "platform": { - "php": "7.4.26" + "php": "8.0.25" }, "preferred-install": "dist", "sort-packages": true diff --git a/composer.lock b/composer.lock index e2022f29..b8b4bc24 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": "5842b7a2732e5535d09aa199c1f8944f", + "content-hash": "d5346a2b3626bac3dab55a85ffa97449", "packages": [], "packages-dev": [ { @@ -5995,12 +5995,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-tokenizer": "*" }, "platform-dev": [], "platform-overrides": { - "php": "7.4.26" + "php": "8.0.25" }, "plugin-api-version": "2.3.0" } diff --git a/infection.json b/infection.json index 6e46e163..b4660362 100644 --- a/infection.json +++ b/infection.json @@ -3,8 +3,8 @@ "logs": { "text": ".build/infection/infection-log.txt" }, - "minCoveredMsi": 85, - "minMsi": 78, + "minCoveredMsi": 88, + "minMsi": 82, "phpUnit": { "configDir": "test\/Unit" }, diff --git a/src/Constructs.php b/src/Constructs.php index b2e509a6..0603eb2a 100644 --- a/src/Constructs.php +++ b/src/Constructs.php @@ -40,17 +40,9 @@ public static function fromSource(string $source): array $namespaceSegmentOrNamespaceTokens = [ \T_STRING, + \T_NAME_QUALIFIED, ]; - // https://wiki.php.net/rfc/namespaced_names_as_token - if (\PHP_VERSION_ID >= 80000 && \defined('T_NAME_QUALIFIED')) { - /** @var array $namespaceSegmentOrNamespaceTokens */ - $namespaceSegmentOrNamespaceTokens = [ - \T_STRING, - \T_NAME_QUALIFIED, - ]; - } - $classyTokens = [ \T_CLASS, \T_INTERFACE,