diff --git a/.github/workflows/composer-json-lint.yml b/.github/workflows/composer-json-lint.yml index 12f35f8..a49ef17 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" @@ -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 c0e7862..f628aa2 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" @@ -37,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') }}" 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 diff --git a/src/PhpCsFixer/Rules.php b/src/PhpCsFixer/Rules.php index a7b5ac5..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 = [ @@ -93,6 +99,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 [