{"action":"created","comment":{"url":"https://api.github.com/repos/mpscholten/request-parser/pulls/comments/72644871","id":72644871,"diff_hunk":"@@ -37,6 +52,13 @@ public function required()\n \n     private function createNotFoundException()\n     {\n-        return call_user_func($this->exceptionFactory, $this->name);\n+        return $this->exceptionFactory->createNotFoundException($this->name);\n     }\n+\n+    final protected function createInvalidValueException()\n+    {\n+        return $this->exceptionFactory->createInvalidValueException($this->name, $this->unparsedValue, $this->describe());\n+    }\n+\n+    abstract protected function describe();","path":"src/AbstractValueParser.php","position":54,"original_position":54,"commit_id":"3992f4ccb97c3d2b4435106311e378bef1b4ac18","original_commit_id":"3992f4ccb97c3d2b4435106311e378bef1b4ac18","user":{"login":"yuvalherziger","id":5735586,"avatar_url":"https://avatars.githubusercontent.com/u/5735586?v=3","gravatar_id":"","url":"https://api.github.com/users/yuvalherziger","html_url":"https://github.com/yuvalherziger","followers_url":"https://api.github.com/users/yuvalherziger/followers","following_url":"https://api.github.com/users/yuvalherziger/following{/other_user}","gists_url":"https://api.github.com/users/yuvalherziger/gists{/gist_id}","starred_url":"https://api.github.com/users/yuvalherziger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuvalherziger/subscriptions","organizations_url":"https://api.github.com/users/yuvalherziger/orgs","repos_url":"https://api.github.com/users/yuvalherziger/repos","events_url":"https://api.github.com/users/yuvalherziger/events{/privacy}","received_events_url":"https://api.github.com/users/yuvalherziger/received_events","type":"User","site_admin":false},"body":"Very nice idea 🎉 ","created_at":"2016-07-28T15:29:43Z","updated_at":"2016-07-28T15:29:43Z","html_url":"https://github.com/mpscholten/request-parser/pull/23#discussion_r72644871","pull_request_url":"https://api.github.com/repos/mpscholten/request-parser/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/mpscholten/request-parser/pulls/comments/72644871"},"html":{"href":"https://github.com/mpscholten/request-parser/pull/23#discussion_r72644871"},"pull_request":{"href":"https://api.github.com/repos/mpscholten/request-parser/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/mpscholten/request-parser/pulls/23","id":79093069,"html_url":"https://github.com/mpscholten/request-parser/pull/23","diff_url":"https://github.com/mpscholten/request-parser/pull/23.diff","patch_url":"https://github.com/mpscholten/request-parser/pull/23.patch","issue_url":"https://api.github.com/repos/mpscholten/request-parser/issues/23","number":23,"state":"open","locked":false,"title":"[WIP] Refine the exception hierarchy","user":{"login":"mpscholten","id":2072185,"avatar_url":"https://avatars.githubusercontent.com/u/2072185?v=3","gravatar_id":"","url":"https://api.github.com/users/mpscholten","html_url":"https://github.com/mpscholten","followers_url":"https://api.github.com/users/mpscholten/followers","following_url":"https://api.github.com/users/mpscholten/following{/other_user}","gists_url":"https://api.github.com/users/mpscholten/gists{/gist_id}","starred_url":"https://api.github.com/users/mpscholten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpscholten/subscriptions","organizations_url":"https://api.github.com/users/mpscholten/orgs","repos_url":"https://api.github.com/users/mpscholten/repos","events_url":"https://api.github.com/users/mpscholten/events{/privacy}","received_events_url":"https://api.github.com/users/mpscholten/received_events","type":"User","site_admin":false},"body":"Implementation for #22.\r\n\r\nThis includes adding a new `ExceptionFactory` interface to provide an easy\r\nway to customize exceptions. The standard implementation is\r\n`DefaultExceptionFactory` and throws `NotFoundException` and `InvalidValueException`.\r\n\r\nAlso includes a `LegacyExceptionFactory` for support b.c. to the old closure\r\nbased exception configuration.\r\n\r\nOpen todos:\r\n- [ ] Update documentation\r\n- [x] Implement `describe` for the remaining parsers\r\n- [x] Fix failing tests\r\n- [x] Add tests\r\n- [x] Add some more doc blocks to the API methods with some examples\r\n- [ ] Look for possible b.c. breaks and decide how to handle them","created_at":"2016-07-27T20:35:40Z","updated_at":"2016-07-28T15:29:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe00c3dc14c3f14eab7c6870938f6a1c34c5328d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mpscholten/request-parser/pulls/23/commits","review_comments_url":"https://api.github.com/repos/mpscholten/request-parser/pulls/23/comments","review_comment_url":"https://api.github.com/repos/mpscholten/request-parser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mpscholten/request-parser/issues/23/comments","statuses_url":"https://api.github.com/repos/mpscholten/request-parser/statuses/3992f4ccb97c3d2b4435106311e378bef1b4ac18","head":{"label":"mpscholten:exception-refactoring","ref":"exception-refactoring","sha":"3992f4ccb97c3d2b4435106311e378bef1b4ac18","user":{"login":"mpscholten","id":2072185,"avatar_url":"https://avatars.githubusercontent.com/u/2072185?v=3","gravatar_id":"","url":"https://api.github.com/users/mpscholten","html_url":"https://github.com/mpscholten","followers_url":"https://api.github.com/users/mpscholten/followers","following_url":"https://api.github.com/users/mpscholten/following{/other_user}","gists_url":"https://api.github.com/users/mpscholten/gists{/gist_id}","starred_url":"https://api.github.com/users/mpscholten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpscholten/subscriptions","organizations_url":"https://api.github.com/users/mpscholten/orgs","repos_url":"https://api.github.com/users/mpscholten/repos","events_url":"https://api.github.com/users/mpscholten/events{/privacy}","received_events_url":"https://api.github.com/users/mpscholten/received_events","type":"User","site_admin":false},"repo":{"id":61488582,"name":"request-parser","full_name":"mpscholten/request-parser","owner":{"login":"mpscholten","id":2072185,"avatar_url":"https://avatars.githubusercontent.com/u/2072185?v=3","gravatar_id":"","url":"https://api.github.com/users/mpscholten","html_url":"https://github.com/mpscholten","followers_url":"https://api.github.com/users/mpscholten/followers","following_url":"https://api.github.com/users/mpscholten/following{/other_user}","gists_url":"https://api.github.com/users/mpscholten/gists{/gist_id}","starred_url":"https://api.github.com/users/mpscholten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpscholten/subscriptions","organizations_url":"https://api.github.com/users/mpscholten/orgs","repos_url":"https://api.github.com/users/mpscholten/repos","events_url":"https://api.github.com/users/mpscholten/events{/privacy}","received_events_url":"https://api.github.com/users/mpscholten/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpscholten/request-parser","description":"Small PHP Library for type-safe input handling","fork":false,"url":"https://api.github.com/repos/mpscholten/request-parser","forks_url":"https://api.github.com/repos/mpscholten/request-parser/forks","keys_url":"https://api.github.com/repos/mpscholten/request-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpscholten/request-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpscholten/request-parser/teams","hooks_url":"https://api.github.com/repos/mpscholten/request-parser/hooks","issue_events_url":"https://api.github.com/repos/mpscholten/request-parser/issues/events{/number}","events_url":"https://api.github.com/repos/mpscholten/request-parser/events","assignees_url":"https://api.github.com/repos/mpscholten/request-parser/assignees{/user}","branches_url":"https://api.github.com/repos/mpscholten/request-parser/branches{/branch}","tags_url":"https://api.github.com/repos/mpscholten/request-parser/tags","blobs_url":"https://api.github.com/repos/mpscholten/request-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpscholten/request-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpscholten/request-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpscholten/request-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpscholten/request-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/mpscholten/request-parser/languages","stargazers_url":"https://api.github.com/repos/mpscholten/request-parser/stargazers","contributors_url":"https://api.github.com/repos/mpscholten/request-parser/contributors","subscribers_url":"https://api.github.com/repos/mpscholten/request-parser/subscribers","subscription_url":"https://api.github.com/repos/mpscholten/request-parser/subscription","commits_url":"https://api.github.com/repos/mpscholten/request-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpscholten/request-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpscholten/request-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpscholten/request-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpscholten/request-parser/contents/{+path}","compare_url":"https://api.github.com/repos/mpscholten/request-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpscholten/request-parser/merges","archive_url":"https://api.github.com/repos/mpscholten/request-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpscholten/request-parser/downloads","issues_url":"https://api.github.com/repos/mpscholten/request-parser/issues{/number}","pulls_url":"https://api.github.com/repos/mpscholten/request-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/mpscholten/request-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/mpscholten/request-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpscholten/request-parser/labels{/name}","releases_url":"https://api.github.com/repos/mpscholten/request-parser/releases{/id}","deployments_url":"https://api.github.com/repos/mpscholten/request-parser/deployments","created_at":"2016-06-19T16:10:51Z","updated_at":"2016-07-27T16:39:58Z","pushed_at":"2016-07-28T12:45:44Z","git_url":"git://github.com/mpscholten/request-parser.git","ssh_url":"git@github.com:mpscholten/request-parser.git","clone_url":"https://github.com/mpscholten/request-parser.git","svn_url":"https://github.com/mpscholten/request-parser","homepage":"","size":140,"stargazers_count":36,"watchers_count":36,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":9,"forks":2,"open_issues":9,"watchers":36,"default_branch":"master"}},"base":{"label":"mpscholten:master","ref":"master","sha":"02df6ccfcdba7faba44707153ef098bc65334ef2","user":{"login":"mpscholten","id":2072185,"avatar_url":"https://avatars.githubusercontent.com/u/2072185?v=3","gravatar_id":"","url":"https://api.github.com/users/mpscholten","html_url":"https://github.com/mpscholten","followers_url":"https://api.github.com/users/mpscholten/followers","following_url":"https://api.github.com/users/mpscholten/following{/other_user}","gists_url":"https://api.github.com/users/mpscholten/gists{/gist_id}","starred_url":"https://api.github.com/users/mpscholten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpscholten/subscriptions","organizations_url":"https://api.github.com/users/mpscholten/orgs","repos_url":"https://api.github.com/users/mpscholten/repos","events_url":"https://api.github.com/users/mpscholten/events{/privacy}","received_events_url":"https://api.github.com/users/mpscholten/received_events","type":"User","site_admin":false},"repo":{"id":61488582,"name":"request-parser","full_name":"mpscholten/request-parser","owner":{"login":"mpscholten","id":2072185,"avatar_url":"https://avatars.githubusercontent.com/u/2072185?v=3","gravatar_id":"","url":"https://api.github.com/users/mpscholten","html_url":"https://github.com/mpscholten","followers_url":"https://api.github.com/users/mpscholten/followers","following_url":"https://api.github.com/users/mpscholten/following{/other_user}","gists_url":"https://api.github.com/users/mpscholten/gists{/gist_id}","starred_url":"https://api.github.com/users/mpscholten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpscholten/subscriptions","organizations_url":"https://api.github.com/users/mpscholten/orgs","repos_url":"https://api.github.com/users/mpscholten/repos","events_url":"https://api.github.com/users/mpscholten/events{/privacy}","received_events_url":"https://api.github.com/users/mpscholten/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpscholten/request-parser","description":"Small PHP Library for type-safe input handling","fork":false,"url":"https://api.github.com/repos/mpscholten/request-parser","forks_url":"https://api.github.com/repos/mpscholten/request-parser/forks","keys_url":"https://api.github.com/repos/mpscholten/request-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpscholten/request-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpscholten/request-parser/teams","hooks_url":"https://api.github.com/repos/mpscholten/request-parser/hooks","issue_events_url":"https://api.github.com/repos/mpscholten/request-parser/issues/events{/number}","events_url":"https://api.github.com/repos/mpscholten/request-parser/events","assignees_url":"https://api.github.com/repos/mpscholten/request-parser/assignees{/user}","branches_url":"https://api.github.com/repos/mpscholten/request-parser/branches{/branch}","tags_url":"https://api.github.com/repos/mpscholten/request-parser/tags","blobs_url":"https://api.github.com/repos/mpscholten/request-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpscholten/request-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpscholten/request-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpscholten/request-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpscholten/request-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/mpscholten/request-parser/languages","stargazers_url":"https://api.github.com/repos/mpscholten/request-parser/stargazers","contributors_url":"https://api.github.com/repos/mpscholten/request-parser/contributors","subscribers_url":"https://api.github.com/repos/mpscholten/request-parser/subscribers","subscription_url":"https://api.github.com/repos/mpscholten/request-parser/subscription","commits_url":"https://api.github.com/repos/mpscholten/request-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpscholten/request-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpscholten/request-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpscholten/request-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpscholten/request-parser/contents/{+path}","compare_url":"https://api.github.com/repos/mpscholten/request-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpscholten/request-parser/merges","archive_url":"https://api.github.com/repos/mpscholten/request-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpscholten/request-parser/downloads","issues_url":"https://api.github.com/repos/mpscholten/request-parser/issues{/number}","pulls_url":"https://api.github.com/repos/mpscholten/request-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/mpscholten/request-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/mpscholten/request-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpscholten/request-parser/labels{/name}","releases_url":"https://api.github.com/repos/mpscholten/request-parser/releases{/id}","deployments_url":"https://api.github.com/repos/mpscholten/request-parser/deployments","created_at":"2016-06-19T16:10:51Z","updated_at":"2016-07-27T16:39:58Z","pushed_at":"2016-07-28T12:45:44Z","git_url":"git://github.com/mpscholten/request-parser.git","ssh_url":"git@github.com:mpscholten/request-parser.git","clone_url":"https://github.com/mpscholten/request-parser.git","svn_url":"https://github.com/mpscholten/request-parser","homepage":"","size":140,"stargazers_count":36,"watchers_count":36,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":9,"forks":2,"open_issues":9,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mpscholten/request-parser/pulls/23"},"html":{"href":"https://github.com/mpscholten/request-parser/pull/23"},"issue":{"href":"https://api.github.com/repos/mpscholten/request-parser/issues/23"},"comments":{"href":"https://api.github.com/repos/mpscholten/request-parser/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/mpscholten/request-parser/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/mpscholten/request-parser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mpscholten/request-parser/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/mpscholten/request-parser/statuses/3992f4ccb97c3d2b4435106311e378bef1b4ac18"}}}}
{"actor":{"display_login":"yuvalherziger"}}