{"action":"closed","issue":{"url":"https://api.github.com/repos/usatoday-smb/grunt-wp-audit/issues/3","repository_url":"https://api.github.com/repos/usatoday-smb/grunt-wp-audit","labels_url":"https://api.github.com/repos/usatoday-smb/grunt-wp-audit/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/usatoday-smb/grunt-wp-audit/issues/3/comments","events_url":"https://api.github.com/repos/usatoday-smb/grunt-wp-audit/issues/3/events","html_url":"https://github.com/usatoday-smb/grunt-wp-audit/issues/3","id":241072483,"number":3,"title":"PHPCS 3.0 and WPCS version conflict","user":{"login":"MayBeTall","id":24262625,"avatar_url":"https://avatars1.githubusercontent.com/u/24262625?v=3","gravatar_id":"","url":"https://api.github.com/users/MayBeTall","html_url":"https://github.com/MayBeTall","followers_url":"https://api.github.com/users/MayBeTall/followers","following_url":"https://api.github.com/users/MayBeTall/following{/other_user}","gists_url":"https://api.github.com/users/MayBeTall/gists{/gist_id}","starred_url":"https://api.github.com/users/MayBeTall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MayBeTall/subscriptions","organizations_url":"https://api.github.com/users/MayBeTall/orgs","repos_url":"https://api.github.com/users/MayBeTall/repos","events_url":"https://api.github.com/users/MayBeTall/events{/privacy}","received_events_url":"https://api.github.com/users/MayBeTall/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-06T20:13:50Z","updated_at":"2017-07-12T15:32:50Z","closed_at":"2017-07-12T15:32:50Z","body":"New installs of grunt-wp-audit get an error when running the PHP check:\r\n\r\n\r\n```\r\nRunning \"wp-php:target\" (wp-php) task\r\nFailed command:\r\n/bin/sh -c echo \"\" | node_modules/grunt-wp-audit/php/phpcs --standard=./config/phpcs.xml --report=json ../[file.php]\r\nWarning: Command failed: /bin/sh -c echo \"\" | node_modules/grunt-wp-audit/php/phpcs --standard=./config/phpcs.xml --report=json ../[file.php]\r\nPHP Fatal error:  Class 'WordPress_Sniff' not found in [project folder]/node_modules/grunt-wp-audit/php/wpcs/WordPress/Sniffs/Variables/GlobalVariablesSniff.php on line 20\r\n```\r\n\r\nIssue tracked to version incompatibility between WPCS and PHPCS 3.0:\r\nhttps://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/718\r\n\r\nCurrently the module downloads the latest .phar file of PHPCS directly from their GitHub repo in install.sh:\r\n`PHPCS_URL='https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar'`\r\n\r\nSwitching this url to PHPCS 2.8.0 corrects the issue:\r\n`PHPCS_URL='https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.8.0/phpcs.phar'`\r\n\r\nI've created a pull request #4 to fix the issue."}}
{"actor":{"display_login":"MayBeTall"}}