Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.3"
- "8.4"
operating-system:
- "ubuntu-latest"

Expand All @@ -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') }}"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
operating-system:
- "ubuntu-latest"

Expand All @@ -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') }}"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions src/PhpCsFixer/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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 = [
Expand Down Expand Up @@ -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 [
Expand Down