{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2-coding-standards/issues/23","repository_url":"https://api.github.com/repos/yiisoft/yii2-coding-standards","labels_url":"https://api.github.com/repos/yiisoft/yii2-coding-standards/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2-coding-standards/issues/23/comments","events_url":"https://api.github.com/repos/yiisoft/yii2-coding-standards/issues/23/events","html_url":"https://github.com/yiisoft/yii2-coding-standards/issues/23","id":157221543,"number":23,"title":"How to install Yii2 coding standard","user":{"login":"bubifengyun","id":4437214,"avatar_url":"https://avatars.githubusercontent.com/u/4437214?v=3","gravatar_id":"","url":"https://api.github.com/users/bubifengyun","html_url":"https://github.com/bubifengyun","followers_url":"https://api.github.com/users/bubifengyun/followers","following_url":"https://api.github.com/users/bubifengyun/following{/other_user}","gists_url":"https://api.github.com/users/bubifengyun/gists{/gist_id}","starred_url":"https://api.github.com/users/bubifengyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bubifengyun/subscriptions","organizations_url":"https://api.github.com/users/bubifengyun/orgs","repos_url":"https://api.github.com/users/bubifengyun/repos","events_url":"https://api.github.com/users/bubifengyun/events{/privacy}","received_events_url":"https://api.github.com/users/bubifengyun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-27T14:40:13Z","updated_at":"2016-05-29T03:30:11Z","closed_at":null,"body":"> /opt/lampp/htdocs/www/wuzhishan$ /opt/lampp/bin/phpcs --extensions=php --standard=Yii2 ./\r\nERROR: the \"Yii2\" coding standard is not installed. The installed coding standards are PHPCS, Zend, Squiz, MySource, PSR2, PEAR and PSR1\r\n\r\nI am so sorry that YII 2 coding standard is not installed. I cannot understand the Getting code.\r\nI installed phpcs in my /opt/lampp/bin/phpcs.\r\nmy network is located in /opt/lampp/htdocs/www/wuzhishan/ \r\n\r\nthis code from README.md\r\n\r\n```bash\r\n$ ./vendor/bin/phpcs --extensions=php --standard=Yii2 /home/resurtm/work/Yii2MegaApp/\r\n```\r\n\r\nwhat the last Yii2MegaApp means? is it an app?\r\nThank you."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2-coding-standards/issues/comments/222340782","html_url":"https://github.com/yiisoft/yii2-coding-standards/issues/23#issuecomment-222340782","issue_url":"https://api.github.com/repos/yiisoft/yii2-coding-standards/issues/23","id":222340782,"user":{"login":"larryli","id":10723,"avatar_url":"https://avatars.githubusercontent.com/u/10723?v=3","gravatar_id":"","url":"https://api.github.com/users/larryli","html_url":"https://github.com/larryli","followers_url":"https://api.github.com/users/larryli/followers","following_url":"https://api.github.com/users/larryli/following{/other_user}","gists_url":"https://api.github.com/users/larryli/gists{/gist_id}","starred_url":"https://api.github.com/users/larryli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larryli/subscriptions","organizations_url":"https://api.github.com/users/larryli/orgs","repos_url":"https://api.github.com/users/larryli/repos","events_url":"https://api.github.com/users/larryli/events{/privacy}","received_events_url":"https://api.github.com/users/larryli/received_events","type":"User","site_admin":false},"created_at":"2016-05-29T03:30:11Z","updated_at":"2016-05-29T03:30:11Z","body":"You can install yiisoft/yii2-coding-standards by composer:\r\n\r\n```json\r\n    \"require-dev\": {\r\n        \"yiisoft/yii2-debug\": \"*\",\r\n        \"yiisoft/yii2-gii\": \"*\",\r\n        \"yiisoft/yii2-coding-standards\": \"2.*\"\r\n    }\r\n```\r\n\r\nNext, create a `phpcs.xml.dist` at project root, see [PHP_CodeSniffer Documentation: Using a Default Configuration File](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file)\r\n\r\n```xml\r\n<?xml version=\"1.0\"?>\r\n<ruleset name=\"Yii2 App Basic Standard\">\r\n    <description>Yii2 App Basic coding standard</description>\r\n\r\n    <exclude-pattern>/runtime/*</exclude-pattern>\r\n    <exclude-pattern>/web/assets/*</exclude-pattern>\r\n    <exclude-pattern>/vendor/*</exclude-pattern>\r\n    <exclude-pattern>/requirements.php</exclude-pattern>\r\n\r\n    <rule ref=\"vendor/yiisoft/yii2-coding-standards/Yii2\"/>\r\n\r\n    <rule ref=\"PSR1.Classes.ClassDeclaration.MissingNamespace\">\r\n        <exclude-pattern>/migrations/*</exclude-pattern>\r\n    </rule>\r\n    <rule ref=\"Squiz.Classes.ValidClassName.NotCamelCaps\">\r\n        <exclude-pattern>/migrations/*</exclude-pattern>\r\n    </rule>\r\n</ruleset>\r\n```\r\n\r\nLast, use command:\r\n\r\n```shell\r\nphp composer.phar install --dev\r\nvendor/bin/phpcs --encoding=utf-8 --extensions=php .\r\n```"}}
{"actor":{"display_login":"larryli"}}