Skip to content

Commit dfdeccc

Browse files
authored
Ensure trailing_comma_in_multiline is compatible with PHP 7.4
1 parent d44c76c commit dfdeccc

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co
99

1010
## Unreleased
1111

12+
## v5.9.2
13+
14+
### Fixed
15+
16+
- Ensure `trailing_comma_in_multiline` is compatible with PHP 7.4
17+
1218
## v5.9.1
1319

1420
### Fixed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Shared configuration for php-cs-fixer
88

99
## Installation
1010

11-
composer require --dev mll-lab/php-cs-fixer-config
11+
```sh
12+
composer require --dev mll-lab/php-cs-fixer-config
13+
```
1214

1315
## Usage
1416

config.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ function config(Finder $finder, array $ruleOverrides = []): Config
6969
'phpdoc_to_comment' => false, // Intermediary PHPDocs are sometimes useful to provide type assertions for PHPStan
7070
'single_line_empty_body' => true,
7171
'single_line_throw' => false,
72+
// TODO add trailing commas everywhere when dropping PHP 7.4
73+
'trailing_comma_in_multiline' => [
74+
'after_heredoc' => true,
75+
'elements' => [
76+
'array_destructuring',
77+
'arrays',
78+
],
79+
],
7280
'yoda_style' => [ // Not necessary with static analysis, non-Yoda is more natural to write and read
7381
'equal' => false,
7482
'identical' => false,

0 commit comments

Comments
 (0)