diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a80412..b9e827f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co ## Unreleased +## v5.9.2 + +### Fixed + +- Ensure `trailing_comma_in_multiline` is compatible with PHP 7.4 + ## v5.9.1 ### Fixed diff --git a/README.md b/README.md index d6113ba..166c61b 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ Shared configuration for php-cs-fixer ## Installation - composer require --dev mll-lab/php-cs-fixer-config +```sh +composer require --dev mll-lab/php-cs-fixer-config +``` ## Usage diff --git a/config.php b/config.php index 5200f95..1727f52 100644 --- a/config.php +++ b/config.php @@ -69,6 +69,14 @@ function config(Finder $finder, array $ruleOverrides = []): Config 'phpdoc_to_comment' => false, // Intermediary PHPDocs are sometimes useful to provide type assertions for PHPStan 'single_line_empty_body' => true, 'single_line_throw' => false, + // TODO add trailing commas everywhere when dropping PHP 7.4 + 'trailing_comma_in_multiline' => [ + 'after_heredoc' => true, + 'elements' => [ + 'array_destructuring', + 'arrays', + ], + ], 'yoda_style' => [ // Not necessary with static analysis, non-Yoda is more natural to write and read 'equal' => false, 'identical' => false,