-
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 PHPCS to v3.4 #88
Conversation
@rmccue I'm seeing a quite odd error coming through in the PHPUnit tests that is not coming through when running the CS suite in the CLI. The
This is indicating that there is no tab character on that line (and every other indented line in that file) but there absolutely is a tab character there. This error does not run in the CLI. I cannot find any files issues in the PHPCS repo and I'm a little stumped on what could be happening here. Any ideas? |
@mikeselander You may need to entirely wipe both |
@rmccue I've tried that to no avail and also this is happening on Travis as well as locally :( |
Where I've gotten so far on debugging this today:
Halp |
PHPCS 3.4 was released 24 days ago, I wonder if we could jump to that? |
I went ahead and bumped one more version, good idea @nathanielks 👍 |
@@ -4,9 +4,10 @@ | |||
"type": "project", | |||
"license": "GPL-2.0-or-later", | |||
"require": { | |||
"php": ">=7.1", |
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.
Not sure if this will be an issue, but just to note I've seen some peeps using php7.0 for travis/circle setups, so we should expect our next version to stop working in those situations.
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.
We could set that back to 7.0 if that is a wide-spread practice. I'm a little concerned about our engineers testing in WP 7.0 when all of our major hosting partners are using 7.2+. I know of only one project where we don't have access to 7.0+ and they don't appear to be using the standards.
@mikeselander IMO merge at will! |
Hi everyone! I think I found an explanation for the errors triggered when running the test suite: The first time that However, when the second and following tests are executed, Since the value of The errors are triggered because having A quick way to test the above is adding I tried using |
@wvega thank you so much for digging into this and for the detailed explanation on what's going on. Your recommendation does, indeed, get the tests to pass so that we can move this PR forward. I owe you a drink or two 🍻 |
GREAT forensics, @wvega! Well done! |
Note: the following are rule additions made in PHPCS 3.3 & 3.4. There doesn't look like anything controversial to me, but wanted to identify for when we make notes about this next release. 3.4
3.3
|
PHPCS 3.3 included a plethora of useful bugfixes and improvements and will improve the Linter sniffing for several clients.
Reference: https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.3.0 for a more exhaustive list of bugfixes.
Resolves #70
Resolves #110