{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/53904586","id":53904586,"diff_hunk":"@@ -1801,22 +1801,31 @@ public function __construct() {\n  * Member Validator\n  *\n  * Custom validation for the Member object can be achieved either through an\n- * {@link DataExtension} on the Member object or, by specifying a subclass of\n+ * {@link DataExtension} on the Member_Validator object or, by specifying a subclass of\n  * {@link Member_Validator} through the {@link Injector} API.\n  *\n+ * Custom required fields can be set via config API, eg.\n+ * Member_Validator:\n+ *   customRequired:\n+ *     - Surname\n+ *\n  * {@see Member::getValidator()}\n  *\n  * @package framework\n  * @subpackage security\n  */\n-class Member_Validator extends RequiredFields {\n-\n-\tprotected $customRequired = array(\n+class Member_Validator extends RequiredFields\n+{\n+\t/**\n+\t * Fields that are required by this validator\n+\t * @config\n+\t * @var array\n+\t */\n+\tprivate static $customRequired = array(","path":"security/Member.php","position":28,"original_position":28,"commit_id":"963e8f51d0beb1715a443b5236b73a9b98857452","original_commit_id":"963e8f51d0beb1715a443b5236b73a9b98857452","user":{"login":"bummzack","id":1006185,"avatar_url":"https://avatars.githubusercontent.com/u/1006185?v=3","gravatar_id":"","url":"https://api.github.com/users/bummzack","html_url":"https://github.com/bummzack","followers_url":"https://api.github.com/users/bummzack/followers","following_url":"https://api.github.com/users/bummzack/following{/other_user}","gists_url":"https://api.github.com/users/bummzack/gists{/gist_id}","starred_url":"https://api.github.com/users/bummzack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bummzack/subscriptions","organizations_url":"https://api.github.com/users/bummzack/orgs","repos_url":"https://api.github.com/users/bummzack/repos","events_url":"https://api.github.com/users/bummzack/events{/privacy}","received_events_url":"https://api.github.com/users/bummzack/received_events","type":"User","site_admin":false},"body":"I see. I guess that would make the config API unusable for that case? \r\n\r\nThen I'll just revert to `protected $customRequired`. Currently, modifying the required fields of the Member_Validator can be achieved by implementing `updateValidator` in an extension to Member, so the config system isn't really needed. I just thought it would be more consistent.","created_at":"2016-02-24T07:55:33Z","updated_at":"2016-02-24T07:55:33Z","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/5088#discussion_r53904586","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/53904586"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/5088#discussion_r53904586"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088","id":60427946,"html_url":"https://github.com/silverstripe/silverstripe-framework/pull/5088","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/5088.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/5088.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5088","number":5088,"state":"open","locked":false,"title":"Fix for issue #5086","user":{"login":"bummzack","id":1006185,"avatar_url":"https://avatars.githubusercontent.com/u/1006185?v=3","gravatar_id":"","url":"https://api.github.com/users/bummzack","html_url":"https://github.com/bummzack","followers_url":"https://api.github.com/users/bummzack/followers","following_url":"https://api.github.com/users/bummzack/following{/other_user}","gists_url":"https://api.github.com/users/bummzack/gists{/gist_id}","starred_url":"https://api.github.com/users/bummzack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bummzack/subscriptions","organizations_url":"https://api.github.com/users/bummzack/orgs","repos_url":"https://api.github.com/users/bummzack/repos","events_url":"https://api.github.com/users/bummzack/events{/privacy}","received_events_url":"https://api.github.com/users/bummzack/received_events","type":"User","site_admin":false},"body":"Improve `Member_Validator` to:\r\n- properly check for existing members.\r\n- allow extensions.\r\n- remove old code and replace with new syntax and config api.\r\n\r\nFix issue in Group code where Member_Validator was instantiated via \"new\" which didn't allow injector overrides.","created_at":"2016-02-23T23:15:26Z","updated_at":"2016-02-24T07:55:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86f6aa9d6af0779a16e1019310ae999b1ae9cdb8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5088/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/963e8f51d0beb1715a443b5236b73a9b98857452","head":{"label":"bummzack:5086-fix-member-validator","ref":"5086-fix-member-validator","sha":"963e8f51d0beb1715a443b5236b73a9b98857452","user":{"login":"bummzack","id":1006185,"avatar_url":"https://avatars.githubusercontent.com/u/1006185?v=3","gravatar_id":"","url":"https://api.github.com/users/bummzack","html_url":"https://github.com/bummzack","followers_url":"https://api.github.com/users/bummzack/followers","following_url":"https://api.github.com/users/bummzack/following{/other_user}","gists_url":"https://api.github.com/users/bummzack/gists{/gist_id}","starred_url":"https://api.github.com/users/bummzack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bummzack/subscriptions","organizations_url":"https://api.github.com/users/bummzack/orgs","repos_url":"https://api.github.com/users/bummzack/repos","events_url":"https://api.github.com/users/bummzack/events{/privacy}","received_events_url":"https://api.github.com/users/bummzack/received_events","type":"User","site_admin":false},"repo":{"id":5955600,"name":"silverstripe-framework","full_name":"bummzack/silverstripe-framework","owner":{"login":"bummzack","id":1006185,"avatar_url":"https://avatars.githubusercontent.com/u/1006185?v=3","gravatar_id":"","url":"https://api.github.com/users/bummzack","html_url":"https://github.com/bummzack","followers_url":"https://api.github.com/users/bummzack/followers","following_url":"https://api.github.com/users/bummzack/following{/other_user}","gists_url":"https://api.github.com/users/bummzack/gists{/gist_id}","starred_url":"https://api.github.com/users/bummzack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bummzack/subscriptions","organizations_url":"https://api.github.com/users/bummzack/orgs","repos_url":"https://api.github.com/users/bummzack/repos","events_url":"https://api.github.com/users/bummzack/events{/privacy}","received_events_url":"https://api.github.com/users/bummzack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bummzack/silverstripe-framework","description":"SilverStripe's Sapphire Framework","fork":true,"url":"https://api.github.com/repos/bummzack/silverstripe-framework","forks_url":"https://api.github.com/repos/bummzack/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/bummzack/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bummzack/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bummzack/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/bummzack/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/bummzack/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/bummzack/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/bummzack/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/bummzack/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/bummzack/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/bummzack/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bummzack/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bummzack/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/bummzack/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bummzack/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/bummzack/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/bummzack/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/bummzack/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/bummzack/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/bummzack/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/bummzack/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/bummzack/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/bummzack/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/bummzack/silverstripe-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/bummzack/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/bummzack/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bummzack/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/bummzack/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bummzack/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/bummzack/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/bummzack/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/bummzack/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/bummzack/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bummzack/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/bummzack/silverstripe-framework/releases{/id}","deployments_url":"https://api.github.com/repos/bummzack/silverstripe-framework/deployments","created_at":"2012-09-25T19:44:16Z","updated_at":"2016-01-13T07:10:16Z","pushed_at":"2016-02-23T23:14:27Z","git_url":"git://github.com/bummzack/silverstripe-framework.git","ssh_url":"git@github.com:bummzack/silverstripe-framework.git","clone_url":"https://github.com/bummzack/silverstripe-framework.git","svn_url":"https://github.com/bummzack/silverstripe-framework","homepage":"http://silverstripe.org/","size":53764,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"3.0"}},"base":{"label":"silverstripe:3.3","ref":"3.3","sha":"35b5c03fbc3aa4cb20fc1f40271d7f2b7f8f8a5a","user":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":1318892,"name":"silverstripe-framework","full_name":"silverstripe/silverstripe-framework","owner":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-framework","description":"SilverStripe Framework, the MVC framework that powers SilverStripe CMS","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-framework","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/releases{/id}","deployments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/deployments","created_at":"2011-02-02T02:04:13Z","updated_at":"2016-02-16T10:56:53Z","pushed_at":"2016-02-24T04:39:08Z","git_url":"git://github.com/silverstripe/silverstripe-framework.git","ssh_url":"git@github.com:silverstripe/silverstripe-framework.git","clone_url":"https://github.com/silverstripe/silverstripe-framework.git","svn_url":"https://github.com/silverstripe/silverstripe-framework","homepage":"http://silverstripe.org/","size":69472,"stargazers_count":490,"watchers_count":490,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":562,"mirror_url":null,"open_issues_count":674,"forks":562,"open_issues":674,"watchers":490,"default_branch":"3"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/5088"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5088"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/5088/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/5088/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/963e8f51d0beb1715a443b5236b73a9b98857452"}}}}