Skip to content

Enhancement: Enable trailing_comma_in_multiline fixer - #647

Merged
Girgias merged 2 commits into
php:masterfrom
localheinz:feature/trailing-comma-in-multiline
Dec 6, 2023
Merged

Enhancement: Enable trailing_comma_in_multiline fixer#647
Girgias merged 2 commits into
php:masterfrom
localheinz:feature/trailing-comma-in-multiline

Conversation

@localheinz

@localheinzlocalheinz commented Jul 12, 2022

Copy link
Copy Markdown
Contributor

This pull request

  • enables the trailing_comma_in_multiline fixer
  • runs make coding-standards

Follows #559.

💁‍♂️ For reference, see https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.40.2/doc/rules/control_structure/trailing_comma_in_multiline.rst.

@localheinz
localheinzforce-pushed the feature/trailing-comma-in-multiline branch 2 times, most recently from 5d74c84 to 81ae171CompareJuly 12, 2022 11:36
Comment threadcal.php Outdated
@localheinz
localheinzforce-pushed the feature/trailing-comma-in-multiline branch from afbb9df to 8d02eaeCompareAugust 22, 2022 17:20
@derickr

Copy link
Copy Markdown
Member

This has many conflicts.

@localheinz

Copy link
Copy Markdown
ContributorAuthor

Rebased!

Comment threadgit-php.php Outdated

@GirgiasGirgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, just a couple of questions

@localheinz
localheinzforce-pushed the feature/trailing-comma-in-multiline branch from c48e3f1 to 76baa32CompareDecember 6, 2023 13:52
@Girgias

Copy link
Copy Markdown
Member

Needs a rebase again

@localheinz
localheinzforce-pushed the feature/trailing-comma-in-multiline branch from c29855a to f07cfcbCompareDecember 6, 2023 20:31
@localheinz

Copy link
Copy Markdown
ContributorAuthor

Rebased, @Girgias!

Comment thread.php-cs-fixer.php
'trailing_comma_in_multiline' => [
'elements' => [
'arguments',
'arrays',

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we use PHP 8.2 now, we could also add

  • match
  • parameters

to the elements option.

See https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.40.2/doc/rules/control_structure/trailing_comma_in_multiline.rst#elements.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this probably makes sense as a follow-up PR to not clog this up any longer

@Girgias
Girgias merged commit c093fb5 into php:masterDec 6, 2023
@localheinz
localheinz deleted the feature/trailing-comma-in-multiline branch December 7, 2023 07:52
@localheinz

Copy link
Copy Markdown
ContributorAuthor

Thank you, @cmb69, @derickr, @Girgias, and @saundefined!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@localheinz@derickr@Girgias@cmb69@saundefined