{"action":"created","issue":{"url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/issues/732","repository_url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility","labels_url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/issues/732/labels{/name}","comments_url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/issues/732/comments","events_url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/issues/732/events","html_url":"https://github.com/PHPCompatibility/PHPCompatibility/pull/732","id":356316015,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNjEyODkx","number":732,"title":"Added functionWhitelist for NewFunctions sniff and constantWhitelist …","user":{"login":"cdayjr","id":3406697,"node_id":"MDQ6VXNlcjM0MDY2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3406697?v=4","gravatar_id":"","url":"https://api.github.com/users/cdayjr","html_url":"https://github.com/cdayjr","followers_url":"https://api.github.com/users/cdayjr/followers","following_url":"https://api.github.com/users/cdayjr/following{/other_user}","gists_url":"https://api.github.com/users/cdayjr/gists{/gist_id}","starred_url":"https://api.github.com/users/cdayjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdayjr/subscriptions","organizations_url":"https://api.github.com/users/cdayjr/orgs","repos_url":"https://api.github.com/users/cdayjr/repos","events_url":"https://api.github.com/users/cdayjr/events{/privacy}","received_events_url":"https://api.github.com/users/cdayjr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-02T21:38:27Z","updated_at":"2018-09-03T16:17:32Z","closed_at":"2018-09-03T16:17:32Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/pulls/732","html_url":"https://github.com/PHPCompatibility/PHPCompatibility/pull/732","diff_url":"https://github.com/PHPCompatibility/PHPCompatibility/pull/732.diff","patch_url":"https://github.com/PHPCompatibility/PHPCompatibility/pull/732.patch"},"body":"…for NewConstants sniff\r\n\r\nI was having issues using this with PHP 5.3 and the [password_compat](https://github.com/ircmaxell/password_compat) library, due to the library backporting the PHP 5.5+ password hashing functions. I checked out how `PHPCompatibility.PHP.RemovedExtensions` was handling its function whitelist and used the same logic in the `NewFunctions` and `NewConstants` sniffs.\r\n\r\nHere's the XML in my `phpcs.xml` file taking advantage of these new custom properties:\r\n\r\n```xml\r\n<rule ref=\"PHPCompatibility.PHP.NewConstants\">\r\n\t<properties>\r\n\t\t<property name=\"constantWhitelist\" type=\"array\" value=\"PASSWORD_BCRYPT,PASSWORD_DEFAULT,PASSWORD_BECRYPT_DEFAULT_COST\" />\r\n\t</properties>\r\n</rule>\r\n<rule ref=\"PHPCompatibility.PHP.NewFunctions\">\r\n\t<properties>\r\n\t\t<property name=\"functionWhitelist\" type=\"array\" value=\"password_hash,password_get_info,password_needs_rehash,password_verify\" />\r\n\t</properties>\r\n</rule>\r\n```"},"comment":{"url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/issues/comments/418155241","html_url":"https://github.com/PHPCompatibility/PHPCompatibility/pull/732#issuecomment-418155241","issue_url":"https://api.github.com/repos/PHPCompatibility/PHPCompatibility/issues/732","id":418155241,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODE1NTI0MQ==","user":{"login":"cdayjr","id":3406697,"node_id":"MDQ6VXNlcjM0MDY2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3406697?v=4","gravatar_id":"","url":"https://api.github.com/users/cdayjr","html_url":"https://github.com/cdayjr","followers_url":"https://api.github.com/users/cdayjr/followers","following_url":"https://api.github.com/users/cdayjr/following{/other_user}","gists_url":"https://api.github.com/users/cdayjr/gists{/gist_id}","starred_url":"https://api.github.com/users/cdayjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdayjr/subscriptions","organizations_url":"https://api.github.com/users/cdayjr/orgs","repos_url":"https://api.github.com/users/cdayjr/repos","events_url":"https://api.github.com/users/cdayjr/events{/privacy}","received_events_url":"https://api.github.com/users/cdayjr/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T16:17:32Z","updated_at":"2018-09-03T16:17:32Z","author_association":"NONE","body":"@jrfnl That's just what I needed, thanks! I should have figured the functionality was already there and did some more digging."}}
{"actor":{"display_login":"cdayjr"}}