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 0ddf9cb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 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
12 changes: 11 additions & 1 deletion src/PhpCsFixer/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Mollie\PhpCodingStandards\PhpCsFixer;

/*
* Last updated for php-cs-fixer version: 3.40.2
* Last updated for php-cs-fixer version: 3.64.0
*/
class Rules
{
Expand Down 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 0ddf9cb

Please sign in to comment.