Project

General

Profile

Actions

Task #94553

closed

Enforce trailing commas in multi line arrays with PHP CS Fixer

Added by Sebastian Michaelsen almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2021-07-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The PHP CS Fixer rule trailing_comma_in_multiline => ['arrays'] ensures that multi line arrays always have a trailing comma.

$array = [
  'one',
  'two'
];

becomes

$array = [
  'one',
  'two',
];

Having trailing commas makes it easier to rearrange entries and when an entry is added to the list the line before doesn't need to be changed. This results in smaller git changes for a better overview and less likely merge conflicts.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #95357: Add trailing comma to array in ext:redirects SlugServiceClosed2021-09-25

Actions
Actions #1

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69825

Actions #2

Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69825

Actions #3

Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69825

Actions #4

Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69825

Actions #5

Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69825

Actions #6

Updated by Gerrit Code Review over 2 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69825

Actions #7

Updated by Benni Mack over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Stefan Bürk over 2 years ago

  • Related to Bug #95357: Add trailing comma to array in ext:redirects SlugService added
Actions #9

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF