A couple of months ago an existing WordPress
sniff was replaced with a more robust Universal
sniff (part of the PHPCSExtra
package).
Commit: https://github.com/WordPress/WordPress-Coding-Standards/commit/8997d689294fbf880b427873e7fa254237f3b87f
Despite the PHPCSExtra
package being a required packed by WordPress-Coding-Standards
, it did not automatically install for me. I believe my issue was a default "minimum-stability": "stable"
setting which prevented PHPCSExtra (still in alpha
) from installing.
I resolved this by installing the following packages manually.
NOTE: I'm using PHPCS + WPCS globally. Remove global
if attempting to install locally for a single project.
composer global require phpcsstandards/phpcsutils:@alpha
composer global require phpcsstandards/phpcsextra:@alpha
Adding the @alpha
flag for each package overrides your default minimum-stability
setting.
Hope this helps!