Automattic / VIP-Coding-Standards

PHP_CodeSniffer ruleset to enforce WordPress VIP coding standards.
https://wpvip.com/documentation/how-to-install-php-code-sniffer-for-wordpress-com-vip/
Other
236 stars 40 forks source link

Fatal eror installing coding standard #424

Closed spacedmonkey closed 5 years ago

spacedmonkey commented 5 years ago

Installing 1.0.0, I get the following error on PHP_CodeSniffer version 3.4.0.


Warning: require_once(/usr/local/bin/wpcs/WordPress/PHPCSAliases.php): failed to open stream: No such file or directory in /usr/local/bin/vipcs/WordPressVIPMinimum/PHPCSCompatibility.php on line 20

Fatal error: require_once(): Failed opening required '/usr/local/bin/wpcs/WordPress/PHPCSAliases.php' (include_path='.:/usr/local/lib/php') in /usr/local/bin/vipcs/WordPressVIPMinimum/PHPCSCompatibility.php on line 20

I tried installing "phpcompatibility/php-compatibility": "^9", manually and still didn't install.

Related: #322

GaryJones commented 5 years ago

You've got a mismatch between VIPCS and WPCS.

VIPCS 1. and below will only work with WPCS 1..

VIPCS 2. (not released, but is it in the develop branch) will work with WPCS 2..

So, it sounds like you'll need to use the develop branch of VIPCS if you want to use WPCS 2.

spacedmonkey commented 5 years ago

I am not trying to use WPCS 2.*., this is just me installing just 1.0.0.

GaryJones commented 5 years ago

What's your Composer command exactly?

GaryJones commented 5 years ago

@spacedmonkey VIPCS 2.0.0 has now been released. Are you able to install it correctly?

spacedmonkey commented 5 years ago

Everything working correctly in v2. 👍