-
Notifications
You must be signed in to change notification settings - Fork 40
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
Review all sniffs for compatibility with PHPCS >= 4.0 #552
Comments
VIP sites run on PHP 7.3, so client developers may/should already have at least PHP 7.2. I'd be fine with having a
Doesn't affect VIPCS.
This is the biggest change for VIPCS. We have a few sniffs that use these tokenisers, including ones related to security. Our proposal so far has been to see if eslint could be added to the Review Bot code, along with packages that could flag the same function calls as what we currently do in our sniffs.
Shouldn't be any of those in VIPCS, but we still occasionally see clients submit code with these in, and I even have a Saved Reply in GH with saying not to use them (and
Old style array properties are already eliminated from VIPCS, and the Review Bot doesn't yet run with full custom XML config files.
Those particular two tokens are not used in VIPCS. |
For the PHPCS native old-style annotation, I'm working on a sniff to detect these and warn about them (and auto-fix). Once that sniff is ready, we could consider including it. For the WPCS old-style comments: the relevant WPCS sniffs have been throwing warnings about the use of the old-style comments for quite some time now. |
I don't think we include those in VIPCS - the client just sees the violation instead. |
@GaryJones So the question then is: should those be included ? Mind: they will be (have been) removed in WPCS 3.0.0. |
Let's not add them to only remove them again relatively shortly. The worst case is that someone sees a violation when they think they've ignored it (so, user error). |
Development on PHPCS 4.x has started a while back.
While there is no timeline known for when it will be ready/released, some (breaking) changes which PHPCS 4.x will contain are already known.
Notable changes as known at the time of writing this:
@codingStandardsIgnoreLine
will be removed. These were deprecated in PHPCS 3.2.0.T_ARRAY_HINT
andT_RETURN_TYPE
which were both deprecated in PHPCS 3.3.0.I expect most of this won't have much effect on the sniffs in VIPCS. If/when more changes become known, I will update the above list.
However, a decision is needed about the future of the sniffs which look at JS/CSS code. There is no urgency (yet), but I'm opening this issue now to raise awareness and open the discussion about this.
The text was updated successfully, but these errors were encountered: