Open helgatheviking opened 1 year ago
Sounds similar to this old issue in the WP sniffs.
Hmm... yes, it does seem similar, but I am not sure how to patch woocommerce sniffs to get it to work with the dev branch of the WP Code standards.
I am not sure how to patch woocommerce sniffs to get it to work with the dev branch of the WP Code standards.
If you fork the repo you could create a branch where you change the package version to dev-trunk
. Then use your fork & branch (dev-BRANCHNAME
) in your plugin composer.json.
I got this error when using period (.) as the file list to check instead of *.php
e.g.
./vendor/bin/phpcs --standard=WordPress-Extra .
PHP Fatal error: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, string given in /vendor/squizlabs/php_codesniffer/src/Files/File.php:1056
Tried replacing . with *.php as shown below and the error does not occur:
./vendor/bin/phpcs --standard=WordPress-Extra *.php
Could we give this some new impetus now that WP Code Standards are updated?
Does this need a dependency update? I am seeing the following then trying to run the code checker sniffs:
using PHP 8.1.12 in Ubuntu