{"action":"created","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/944","repository_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/944/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/944/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/944/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/944","id":145617360,"number":944,"title":"PHP warning when running the latest phar","user":{"login":"ivokund","id":2707429,"avatar_url":"https://avatars.githubusercontent.com/u/2707429?v=3","gravatar_id":"","url":"https://api.github.com/users/ivokund","html_url":"https://github.com/ivokund","followers_url":"https://api.github.com/users/ivokund/followers","following_url":"https://api.github.com/users/ivokund/following{/other_user}","gists_url":"https://api.github.com/users/ivokund/gists{/gist_id}","starred_url":"https://api.github.com/users/ivokund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivokund/subscriptions","organizations_url":"https://api.github.com/users/ivokund/orgs","repos_url":"https://api.github.com/users/ivokund/repos","events_url":"https://api.github.com/users/ivokund/events{/privacy}","received_events_url":"https://api.github.com/users/ivokund/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-04T08:25:17Z","updated_at":"2016-04-05T09:49:04Z","closed_at":null,"body":"This started happening probably after our CI service started downloading the new 2.6.0 release. \r\n\r\nRunning this:\r\n```\r\nurl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar\r\nphp phpcs.phar --standard=PSR2 src \r\n```\r\nProduces:\r\n```\r\nPHP Warning:  chdir(): No such file or directory (errno 2) in phar:///media/sf__SHARE/htdocs/adsales/phpcs.phar/CodeSniffer.php on line 861\r\n```\r\n\r\nNote that the described error does not appear if running without the `--standard=PSR2` flag. Also, running a composer version of PHPCS does not give the error. "},"comment":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments/205733832","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/944#issuecomment-205733832","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/944","id":205733832,"user":{"login":"voult","id":10937458,"avatar_url":"https://avatars.githubusercontent.com/u/10937458?v=3","gravatar_id":"","url":"https://api.github.com/users/voult","html_url":"https://github.com/voult","followers_url":"https://api.github.com/users/voult/followers","following_url":"https://api.github.com/users/voult/following{/other_user}","gists_url":"https://api.github.com/users/voult/gists{/gist_id}","starred_url":"https://api.github.com/users/voult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voult/subscriptions","organizations_url":"https://api.github.com/users/voult/orgs","repos_url":"https://api.github.com/users/voult/repos","events_url":"https://api.github.com/users/voult/events{/privacy}","received_events_url":"https://api.github.com/users/voult/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T09:49:04Z","updated_at":"2016-04-05T09:49:04Z","body":"Can confirm on:\r\n- PHP 7.0.4 (win)\r\n- CodeSniffer 2.6.0\r\n- NetBeans 8.0.2 (using \"phpCS-MD\" plugin)\r\n\r\nWhile setting standard to \"PSR2\".\r\n\r\nHere is dump from manual run with the same settings as NetBeans does:\r\n\r\n>php phpcs.phar [some_path_to_tested_script_here] --standard=PSR2 --report=xml --encoding=UTF8\r\n\r\nPHP Warning:  chdir(): No such file or directory (errno 2) in phar://[some_path_here]/phpcs.phar/CodeSniffer.php on line 861\r\n\r\nWarning: chdir(): No such file or directory (errno 2) in phar://[some_path_here]/phpcs.phar/CodeSniffer.php on line 861\r\n\r\nPHP Notice:  iconv(): Wrong charset, conversion from `utf8' to `utf-8' is not allowed in phar://[some_path_here]/phpcs.phar/CodeSniffer/Reports/Xml.php on line 76\r\n\r\nPHP Notice:  iconv(): Wrong charset, conversion from `utf8' to `utf-8' is not allowed in phar://[some_path_here]/phpcs.phar/CodeSniffer/Reports/Xml.php on line 76\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<phpcs version=\"2.6.0\">\r\n\r\nNotice: iconv(): Wrong charset, conversion from `utf8' to `utf-8' is not allowed in phar://[some_path_here]/phpcs.phar/CodeSniffer/Reports/Xml.php on line 76\r\n\r\nNotice: iconv(): Wrong charset, conversion from `utf8' to `utf-8' is not allowed in phar://[some_path_here]/phpcs.phar/CodeSniffer/Reports/Xml.php on line 76\r\n\r\n<file name=\"[some_path_to_tested_script_here]\" errors=\"2\" warnings=\"0\" fixable=\"2\">\r\n <error line=\"68\" column=\"32\" source=\"Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen\" severity=\"5\" fixable=\"1\"></error>\r\n <error line=\"71\" column=\"1\" source=\"Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose\" severity=\"5\" fixable=\"1\"></error>\r\n</file>\r\n</phpcs>\r\n\r\n"}}