{"id":7306,"date":"2023-09-16T08:45:01","date_gmt":"2023-09-16T08:45:01","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=7306"},"modified":"2023-09-16T08:45:03","modified_gmt":"2023-09-16T08:45:03","slug":"uncaught-error-class-phpcsutilstokenscollections-not-found-in-cusersuserdownloadsphpcompatibilityphpcompatibilitysniffsclassesnewclassessniff-php1134","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/uncaught-error-class-phpcsutilstokenscollections-not-found-in-cusersuserdownloadsphpcompatibilityphpcompatibilitysniffsclassesnewclassessniff-php1134","title":{"rendered":"Uncaught Error: Class &#8220;PHPCSUtils\\Tokens\\Collections&#8221; not found in C:\\Users\\User\\Downloads\\PHPCompatibility\\PHPCompatibility\\Sniffs\\Classes\\NewClassesSniff.php:1134"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">C:\\Users\\User\\Downloads>phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 8\r\nPHP Fatal error:  Uncaught Error: Class \"PHPCSUtils\\Tokens\\Collections\" not found in C:\\Users\\User\\Downloads\\PHPCompatibility\\PHPCompatibility\\Sniffs\\Classes\\NewClassesSniff.php:1134\r\nStack trace:\r\n#0 C:\\Users\\User\\Downloads\\PHP_CodeSniffer\\src\\Ruleset.php(1248): PHPCompatibility\\Sniffs\\Classes\\NewClassesSniff->register()\r\n#1 C:\\Users\\User\\Downloads\\PHP_CodeSniffer\\src\\Ruleset.php(219): PHP_CodeSniffer\\Ruleset->populateTokenListeners()\r\n#2 C:\\Users\\User\\Downloads\\PHP_CodeSniffer\\src\\Runner.php(336): PHP_CodeSniffer\\Ruleset->__construct()\r\n#3 C:\\Users\\User\\Downloads\\PHP_CodeSniffer\\src\\Runner.php(72): PHP_CodeSniffer\\Runner->init()\r\n#4 C:\\Users\\User\\Downloads\\PHP_CodeSniffer\\bin\\phpcs(18): PHP_CodeSniffer\\Runner->runPHPCS()\r\n#5 {main}\r\n  thrown in C:\\Users\\User\\Downloads\\PHPCompatibility\\PHPCompatibility\\Sniffs\\Classes\\NewClassesSniff.php on line 1134<\/code><\/pre>\n\n\n\n<p>Install the required standards as Global ( which puts them in C:\\Users\\User\\AppData\\Roaming\\Composer\\vendor ) <\/p>\n\n\n\n<p><strong>composer global require phpcsstandards\/phpcsutils<\/strong><\/p>\n\n\n\n<p>Add C:\\Users\\User\\AppData\\Roaming\\Composer\\vendor\\bin to your %PATH% in OS<\/p>\n\n\n\n<p>Run PHPCS from C:\\Users\\User\\AppData\\Roaming\\Composer\\vendor\\bin><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7306","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=7306"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7306\/revisions"}],"predecessor-version":[{"id":7307,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7306\/revisions\/7307"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=7306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=7306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=7306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}