From 9a9bfb923012bc685b01bf625fd8f85d0a3cbba6 Mon Sep 17 00:00:00 2001 From: Peter Mein Date: Tue, 14 Oct 2025 09:38:52 +0200 Subject: [PATCH 1/4] Add support for 8.4 Without any specific rules yet. --- .github/workflows/composer-json-lint.yml | 2 +- .github/workflows/php-cs-fixer.yml | 1 + src/PhpCsFixer/Rules.php | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/composer-json-lint.yml b/.github/workflows/composer-json-lint.yml index 12f35f8..5d5a015 100644 --- a/.github/workflows/composer-json-lint.yml +++ b/.github/workflows/composer-json-lint.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: php-version: - - "8.3" + - "8.4" operating-system: - "ubuntu-latest" diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index c0e7862..173189b 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -17,6 +17,7 @@ jobs: - "8.1" - "8.2" - "8.3" + - "8.4" operating-system: - "ubuntu-latest" diff --git a/src/PhpCsFixer/Rules.php b/src/PhpCsFixer/Rules.php index a7b5ac5..066c282 100644 --- a/src/PhpCsFixer/Rules.php +++ b/src/PhpCsFixer/Rules.php @@ -93,6 +93,16 @@ public static function getForPhp83(array $overriddenRules = []): array return array_merge(self::getForPhp82($specific83Rules), $overriddenRules); } + public static function getForPhp84(array $overriddenRules = []): array + { + $specific84Rules = [ + // At the moment there are no specific 8.4 rules or configurations + ]; + + return array_merge(self::getForPhp82($specific84Rules), $overriddenRules); + } + + private static function getBaseRules(): array { return [ From 6f6639225d77bd581e9f5af78747eaa61e344354 Mon Sep 17 00:00:00 2001 From: Peter Mein Date: Tue, 14 Oct 2025 09:46:41 +0200 Subject: [PATCH 2/4] Bump github actions versions Cache v2 -> v4 --- .github/workflows/composer-json-lint.yml | 2 +- .github/workflows/php-cs-fixer.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/composer-json-lint.yml b/.github/workflows/composer-json-lint.yml index 5d5a015..a49ef17 100644 --- a/.github/workflows/composer-json-lint.yml +++ b/.github/workflows/composer-json-lint.yml @@ -34,7 +34,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: "Cache dependencies" - uses: "actions/cache@v2" + uses: "actions/cache@v4" with: path: ${{ steps.composer-cache.outputs.dir }} key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 173189b..f628aa2 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -38,7 +38,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: "Cache dependencies" - uses: "actions/cache@v2" + uses: "actions/cache@v4" with: path: ${{ steps.composer-cache.outputs.dir }} key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" From 216fcd703a7631e8fb9561e48c14b2c93da27222 Mon Sep 17 00:00:00 2001 From: Peter Mein Date: Tue, 14 Oct 2025 09:50:18 +0200 Subject: [PATCH 3/4] Deprecate 7.4 and 8.0 as they are unsupported php version --- src/PhpCsFixer/Rules.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PhpCsFixer/Rules.php b/src/PhpCsFixer/Rules.php index 066c282..8fdbf42 100644 --- a/src/PhpCsFixer/Rules.php +++ b/src/PhpCsFixer/Rules.php @@ -48,6 +48,9 @@ public static function getForPhp73(array $overriddenRules = []): array return array_merge(self::getForPhp72($specific73Rules), $overriddenRules); } + /** + * @deprecated php version 7.4 is no longer supported + */ public static function getForPhp74(array $overriddenRules = []): array { $specific74Rules = [ @@ -57,6 +60,9 @@ public static function getForPhp74(array $overriddenRules = []): array return array_merge(self::getForPhp73($specific74Rules), $overriddenRules); } + /** + * @deprecated php version 8.0 is no longer supported + */ public static function getForPhp80(array $overriddenRules = []): array { $specific80Rules = [ From 2f042f3e141959f5af2c193bdce509d69a28943a Mon Sep 17 00:00:00 2001 From: Peter Mein Date: Tue, 14 Oct 2025 09:52:21 +0200 Subject: [PATCH 4/4] Update README to reflect recent versions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9555ef2..3b0a8be 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ $finder = Finder::create() return (new Config()) ->setFinder($finder) ->setRiskyAllowed(true) - // use specific rules for your php version e.g.: getForPhp74, getForPhp82, getForPhp83 - ->setRules(Rules::getForPhp74()); + // use specific rules for your php version e.g.: getForPhp82, getForPhp83, getForPhp84 + ->setRules(Rules::getForPhp84()); ``` ### Manual Triggering