VIP-Coding-Standards
VIP-Coding-Standards copied to clipboard
Replace WordPress.PHP.StrictComparisons with Universal.Operators.StrictComparisons
In https://github.com/WordPress/WordPress-Coding-Standards/pull/1919, the WordPress.PHP.StrictComparisons sniff was replaced with Universal.Operators.StrictComparisons.
We currently reference it here:
https://github.com/Automattic/VIP-Coding-Standards/blob/60ad148168258afccd05ff0429d53a7e810270a5/WordPress-VIP-Go/ruleset.xml#L216-L218
Please be aware, this change should not be made until WPCS 3.0.0 has been released or - alternatively - PHPCSExtra has become a direct dependency as otherwise the ruleset will break.
Another item that'll need to be addressed with the 3.0+ migration is that the strip_quotes method is no longer included in \WordPressCS\WordPress\Sniff since https://github.com/WordPress/WordPress-Coding-Standards/pull/1926 -- which seems to be used in at least five files --
https://github.com/Automattic/VIP-Coding-Standards/search?q=strip_quotes
@georgestephanis The intention is for VIPCS to start using PHPCSUtils, same as WPCS. A similar strip_quotes() function is available via PHPCSUtils + lots more handy utilities.
As WPCS 3.0.0 will be a major release with breaking changes, in addition to the changelog, an end-user upgrade guide + a dev upgrade guide will be made available.