Skip to content

Conversation

@GaryJones
Copy link
Contributor

See individual commits for info.

GaryJones added 10 commits May 30, 2019 08:15
VIPCS 2.* will be compatible with WPCS 2.*, so increase the minimum version. We'll be using new utility methods added in WPCS 2.1, so have that as the minimum and not WPCS 2.0.

WPCS 2.* requires PHPCS 3.3.1 as the minimum, so we can also have that as a new PHPCS minimum.

Closes #301
The PHPCS compatibility file that was referencing a PHPCS aliases file in WPCS is no longer needed, since WPCS dropped support for PHPCS 2.

Closes #322.
To prevent conflicts with WordPress itself - especially now that WordPress will let go of the PHP 5.2 minimum supported version -, WPCS 2.0 will not use the WordPress namespace.

While PHPCS 2.x still needed to be supported by WPCS, this could not be helped as it was a PHPCS requirement. Now that PHPCS 2.x support is being dropped in WPCS 2.0, the namespace will be adjusted to be `WordPressCS\WordPress`.

This PR updates our import statements and other class references to use the updated namespace.

Closes #299
WPCS moved IniSet checks into their own sniff.
Since WPCS contains whitelist and blacklist, add each item of each to our ruleset test and adjust ruleset test line numbers.

See #413.
The handling of group exclusions for some sniffs was changed in WPCS 2.0.0. It now requires the list of group exclusions to be treated as a property array. See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#excluding-a-group-of-checks for more info.
WPCS 2.1 became more accurate with its security sniffs, so adjust the VIP Go ruleset to match.
Already removed in an earlier commit, this removes the reference to the non-existent file for unit testing.
Mostly `PSR2.Classes.PropertyDeclaration.Underscore` issues.
@GaryJones GaryJones requested a review from rebeccahum May 30, 2019 09:52
@GaryJones GaryJones self-assigned this May 30, 2019
Now that PHPCS 3.3.1 is a minimum, we don't have any env + php combinations to exclude, so can use matrix expansion.
@GaryJones GaryJones merged commit adf7bc9 into develop May 30, 2019
@GaryJones GaryJones deleted the add/wpcs-2-compatibility branch May 30, 2019 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants