-
Notifications
You must be signed in to change notification settings - Fork 11
Initial ECS setup according to current rules #2
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
Conversation
faae8ac to
d4e1bf3
Compare
- and 2. - Sorting of any kind is IMHO good for nothing really. Or do you have any example of some benefit. I cant see one now.
- Comments of any kind are for commenting unclear facts, so if the rule is unclear and should be commented, it should be commented, otherwise the rule is self-explaining, so it does not need any other explanation.
- PHP 7 is present, not the future.. 56 (or older :trollface: ) are obsolete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about join: implode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its already part of NoAliasFunctionsFixer. Also this means sizeof is redundant as well, I will remove it.
Ad 1. & 2. So I sorted it by namespace. And thanks to it I found one duplicate definition. ̄\_(ツ)_/ ̄
Ad 3. So keep them where they are ̄\_(ツ)_/ ̄
Ad 4. So ECS requires PHP ^7.1, so I consider this is answered now :)
fixup! Setup ECS according to currently used rules for php-cs-fixer fixup! fixup! Setup ECS according to currently used rules for php-cs-fixer
0f5a2f1 to
9a10610
Compare
Uh oh!
There was an error while loading. Please reload this page.
This is just an initial import of rules currently defined in
lmc/jobs-metafor both php-cs-fixer and PHP_CodeSniffer into Symfon-DI-like yml format which is used by (alpha) version 4 of Symplify/EasyCodingStandard (ECS).The plan is now to make use of
lmc/jobs-metafor sharing codestyle rules obsolete and switch to ECS instead. As the integration is pretty straightforward, this will make reuse of the codestyle quite easy. ECS support excluding files and/or specific fixers, so it will also be easy to adjust the configuration for edgecases, but still benefit from the standard, well known and unified configuration format.Codebases currenly using rulesets from
lmc/jobs-metashould be 99 % compatible with this configuration - attached configuration was tested on few of them (I tried eg. Jobs, ApiBundle, Consentor, Footer API, ApplyFeedback, CompanyProfiles, matej-client-php, Steward...), so this set of rules is already battle-tested.However what needs to be resolved:
lmc/jobs-meta, but not in php-cs-fixer-ruleset.php - so for not I kept them in the PHP_CodeSniffer section, until we decide if we want to have them or not).(削除) PHP 7-specific rules were not yet part of jobs-meta so they are not part of this (yet). But I will add them directly in the main file - if there is anyone still on PHP 5.6, they can simply skip them. Ok? (削除ここまで)ECS requires PHP ^7.1. So we don't plan using this on PHP ^5.6 projects.Your thoughts?