-
Notifications
You must be signed in to change notification settings - Fork 19
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
Update PHP Standards. #82
Conversation
It'd be great to land this, without it I can't update WPCS to 1.0 locally as Composer SemVer requires HM 0.4.2 or 0.5.0 to use WPCS 0.14.0 /shrug |
composer.json
Outdated
"fig-r/psr2r-sniffer": "^0.5.0", | ||
"squizlabs/php_codesniffer": "~3.2.0" | ||
"squizlabs/php_codesniffer": "~3.2.0", | ||
"wp-coding-standards/wpcs": "^1.0.0" |
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.
Might as well use 1.2.1 at this point. ignore me 😬
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.
Do we know to what degree things have changed in 1.0.0? I don't really follow wpcs at all, but I know there's been a lot of churn, and frankly adding of pretty arbitrary "standards", so this just makes me a bit nervous. If that's all gravy, and we feel we know what we are getting ourselves in for, no worries.
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.
@joehoyle from 0.x to 1.0.0, there did change a lot, most of it being re-structuring of rules, plus a couple deprecations here and there... In this PR, I pretty much made the resulting rules be equivalent to what we had before.
But, to be fair, this PR is almost half a year old, and WPCS is already at version 2.0.0 at the moment. Just saying...
c036af7
to
8cbe16d
Compare
This has been approved, can it be merged? |
composer.json
Outdated
"fig-r/psr2r-sniffer": "^0.5.0", | ||
"squizlabs/php_codesniffer": "~3.2.0" | ||
"squizlabs/php_codesniffer": "~3.2.0", | ||
"wp-coding-standards/wpcs": "^1.0.0" |
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.
Do we know to what degree things have changed in 1.0.0? I don't really follow wpcs at all, but I know there's been a lot of churn, and frankly adding of pretty arbitrary "standards", so this just makes me a bit nervous. If that's all gravy, and we feel we know what we are getting ourselves in for, no worries.
@joehoyle wrote:
FWIW, WPCS 2.0.0 has since been released: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases/tag/2.0.0 |
I'm going to merge this and we will be dogfooding it immediately on a client project. If any updates are needed we should know quickly and before we tag 0.6. Note: CI isn't passing but I will fix that this week. |
This PR includes:
Also, the ruleset has been improved:
*.css
and*.js
files, but really restrict PHPCS to PHP files only.This PR also includes #31.Resolves #108