Skip to content

Commit

Permalink
Change trailing_comma fixer, the Symfony ruleset adjusted their confi…
Browse files Browse the repository at this point in the history
  • Loading branch information
shirshir committed Oct 15, 2024
1 parent f09addf commit 5e5cd46
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
return (new Config())
->setFinder($finder)
->setRiskyAllowed(true)
->setRules(Rules::getForPhp71($overrides));
->setRules(Rules::getForPhp80($overrides));
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^7.1.3 || ^8.0",
"friendsofphp/php-cs-fixer": "^3.40"
"friendsofphp/php-cs-fixer": "^3.64"
},
"minimum-stability": "stable",
"autoload": {
Expand Down
10 changes: 10 additions & 0 deletions src/PhpCsFixer/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@ private static function getBaseRules(): array
'identical' => false,
'less_and_greater' => false,
],
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => [
'arguments',
'array_destructuring',
'arrays',
'match',
'parameters',
]
],
];
}
}

0 comments on commit 5e5cd46

Please sign in to comment.