{"action":"closed","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/2037","repository_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/2037/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/2037/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/2037/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/2037","id":328254893,"node_id":"MDU6SXNzdWUzMjgyNTQ4OTM=","number":2037,"title":"VSCode / Homebrew on MacOS: UnexpectedValueException","user":{"login":"jeff-kilbride","id":14877960,"node_id":"MDQ6VXNlcjE0ODc3OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/14877960?v=4","gravatar_id":"","url":"https://api.github.com/users/jeff-kilbride","html_url":"https://github.com/jeff-kilbride","followers_url":"https://api.github.com/users/jeff-kilbride/followers","following_url":"https://api.github.com/users/jeff-kilbride/following{/other_user}","gists_url":"https://api.github.com/users/jeff-kilbride/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff-kilbride/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff-kilbride/subscriptions","organizations_url":"https://api.github.com/users/jeff-kilbride/orgs","repos_url":"https://api.github.com/users/jeff-kilbride/repos","events_url":"https://api.github.com/users/jeff-kilbride/events{/privacy}","received_events_url":"https://api.github.com/users/jeff-kilbride/received_events","type":"User","site_admin":false},"labels":[{"id":144368661,"node_id":"MDU6TGFiZWwxNDQzNjg2NjE=","url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/labels/Awaiting%20Feedback","name":"Awaiting Feedback","color":"1d76db","default":false},{"id":169372801,"node_id":"MDU6TGFiZWwxNjkzNzI4MDE=","url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/labels/Question","name":"Question","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-31T18:48:57Z","updated_at":"2018-06-06T22:49:45Z","closed_at":"2018-06-06T22:49:45Z","author_association":"NONE","body":"Just a head's up. I don't know if this is a Homebrew problem or something you guys can control. I recently started seeing errors like this in VS Code (extra line breaks to make it easier to read):\r\n```\r\nphpcs: Uncaught UnexpectedValueException: \r\nDirectoryIterator::__construct(/usr/local/etc/php-code-sniffer/Standards): \r\nfailed to open dir: \r\nNo such file or directory in /usr/local/Cellar/php-code-sniffer/3.2.3/src/Util/Standards.php:93\r\n```\r\nThis used to work out of the box, so I'm not sure what has changed. On my system, there is no `/usr/local/etc/php-code-sniffer`.  The closest is `/usr/local/opt/php-code-sniffer` -- which is a symlink to the `/usr/local/Cellar/...` installation. However, that doesn't contain the `Standards` directory that's being looked for.\r\n\r\nIn short, I had to change my `/usr/local/Cellar/php-code-sniffer/3.2.3/CodeSniffer.conf` file to the following to get it to work:\r\n```php\r\n// OLD CONFIG\r\n<?php\r\n $phpCodeSnifferConfig = array (\r\n  'installed_paths' => '/usr/local/etc/php-code-sniffer/Standards',\r\n)\r\n?>\r\n\r\n// WORKING CONFIG\r\n<?php\r\n $phpCodeSnifferConfig = array (\r\n  'installed_paths' => '/usr/local/opt/php-code-sniffer/src/Standards',\r\n)\r\n?>\r\n```\r\nThis is MacOS 10.12.6 using `brew` with php@7.1 installed.\r\n\r\nWanted to put this here in case anyone else is having the same problem."}}
{"actor":{"display_login":"gsherwood"}}