C:\Users\User\Downloads>phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 8
PHP Fatal error: Uncaught Error: Class "PHPCSUtils\Tokens\Collections" not found in C:\Users\User\Downloads\PHPCompatibility\PHPCompatibility\Sniffs\Classes\NewClassesSniff.php:1134
Stack trace:
#0 C:\Users\User\Downloads\PHP_CodeSniffer\src\Ruleset.php(1248): PHPCompatibility\Sniffs\Classes\NewClassesSniff->register()
#1 C:\Users\User\Downloads\PHP_CodeSniffer\src\Ruleset.php(219): PHP_CodeSniffer\Ruleset->populateTokenListeners()
#2 C:\Users\User\Downloads\PHP_CodeSniffer\src\Runner.php(336): PHP_CodeSniffer\Ruleset->__construct()
#3 C:\Users\User\Downloads\PHP_CodeSniffer\src\Runner.php(72): PHP_CodeSniffer\Runner->init()
#4 C:\Users\User\Downloads\PHP_CodeSniffer\bin\phpcs(18): PHP_CodeSniffer\Runner->runPHPCS()
#5 {main}
thrown in C:\Users\User\Downloads\PHPCompatibility\PHPCompatibility\Sniffs\Classes\NewClassesSniff.php on line 1134
Install the required standards as Global ( which puts them in C:\Users\User\AppData\Roaming\Composer\vendor )
composer global require phpcsstandards/phpcsutils
Add C:\Users\User\AppData\Roaming\Composer\vendor\bin to your %PATH% in OS
Run PHPCS from C:\Users\User\AppData\Roaming\Composer\vendor\bin>