Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/Change PHP.MigrationSet to update array/list syntax to short one #5428

Merged
merged 1 commit into from Jan 18, 2021

Conversation

keradus
Copy link
Member

@keradus keradus commented Jan 10, 2021

No description provided.

@tigitz
Copy link
Contributor

tigitz commented Jan 10, 2021

I understand "Migration" as a replacement of a deprecated concept by a new one.

Short array syntax is just an alternative way to express your arrays. array() is not deprecated and short array syntax is not meant to replace it.

Just because someone prefers array() syntax doesn't mean they haven't migrated to 5.4

I feel the rule should stay out of a migration set and be kept as a style preference.

@keradus
Copy link
Member Author

keradus commented Jan 13, 2021

When I created Migration rulesets, they were for purpose of "let use the new language/syntax/feature of higher version of PHP/PHPUnit". I agree one can say it's a matter of style. But one can also say that not using ** operator is matter of style, and we aim to use it, if possible. But no worry, one can always disable the rules s/he would not like to follow

@keradus keradus changed the base branch from 2.17 to master January 18, 2021 01:27
@keradus keradus changed the title propose to PHP.MigrationSet to update array/list syntax to short one Add/Change PHP.MigrationSet to update array/list syntax to short one Jan 18, 2021
@keradus keradus modified the milestones: 2.18.1, 2.18.0 Jan 18, 2021
@keradus keradus marked this pull request as ready for review January 18, 2021 01:39
@keradus keradus merged commit 809ec13 into PHP-CS-Fixer:master Jan 18, 2021
@keradus keradus deleted the 2.17_short_syntax branch January 18, 2021 02:00
@keradus
Copy link
Member Author

keradus commented Jan 18, 2021

Closes #5389

Rule set ``@PHP54Migration``
============================

Rules to improve code for PHP 5.6 compatibility.
Copy link
Contributor

Choose a reason for hiding this comment

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

PHP54Migration but then you say PHP 5.6, seems weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

typo, already fixed in other PR. thanks

This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants