Core: Defer to upstream Generic.PHP.DiscourageGoto sniff (PHPCS 3.2.0)
#1578
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHPCS 3.2.0 includes the same
DiscourageGotosniff as was previously pulled to WPCS.As the minimum PHPCS requirement has gone up to beyond 3.2.0 now, we can switch over to use the upstream version instead.
Note:
Deprecating the WPCS version of the sniff and letting it extend the upstream version and throwing a deprecation message would be useless in this case, as:
So, as this will be going into a major release anyway, we may as well get the change over with.
Note: this is a BC-break for anyone using a custom ruleset or PHPCS annotations referencing the previously included sniff.
Refs:
gotolanguage construct squizlabs/PHP_CodeSniffer#1662