Skip to content

Commit

Permalink
Ensure trailing_comma_in_multiline is compatible with PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia authored Sep 2, 2024
1 parent d44c76c commit dfdeccc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dfdeccc

Please sign in to comment.