{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments/77916463","id":77916463,"diff_hunk":"@@ -302,4 +288,47 @@ public function matching(Criteria $criteria)\n \n         return new LazyCriteriaCollection($persister, $criteria);\n     }\n+\n+    /**\n+     * Resolves a magic method call to the proper existent method at `EntityRepository`.\n+     *\n+     * @param string $method    The method to call\n+     * @param string $by        The property name used as condition\n+     * @param array  $arguments The arguments to pass at method call\n+     *\n+     * @throws ORMException If the method called is invalid.\n+     *\n+     * @return mixed\n+     */\n+    private function resolveMagicCall($method, $by, array $arguments = [])\n+    {\n+        $argsCount = count($arguments);\n+\n+        if (0 === $argsCount) {\n+            throw ORMException::findByRequiresParameter($method . $by);\n+        }\n+\n+        $fieldName = lcfirst(\\Doctrine\\Common\\Util\\Inflector::classify($by));\n+\n+        if ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName)) {\n+            switch ($argsCount) {\n+                case 1:\n+                    return $this->$method(array($fieldName => $arguments[0]));\n+\n+                case 2:\n+                    return $this->$method(array($fieldName => $arguments[0]), $arguments[1]);\n+\n+                case 3:\n+                    return $this->$method(array($fieldName => $arguments[0]), $arguments[1], $arguments[2]);\n+\n+                case 4:","path":"lib/Doctrine/ORM/EntityRepository.php","position":131,"original_position":131,"commit_id":"fe0b4057a8b98912759eb8687c0a2addf519b188","original_commit_id":"69e4abe405d369ad1c8c552b4177a9acaba54d59","user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"body":"I'll apply this on merge: merging and moving forward from `master` myself :-)","created_at":"2016-09-07T22:30:08Z","updated_at":"2016-09-07T22:30:08Z","html_url":"https://github.com/doctrine/doctrine2/pull/6003#discussion_r77916463","pull_request_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003","_links":{"self":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments/77916463"},"html":{"href":"https://github.com/doctrine/doctrine2/pull/6003#discussion_r77916463"},"pull_request":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003"}}},"pull_request":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003","id":83847442,"html_url":"https://github.com/doctrine/doctrine2/pull/6003","diff_url":"https://github.com/doctrine/doctrine2/pull/6003.diff","patch_url":"https://github.com/doctrine/doctrine2/pull/6003.patch","issue_url":"https://api.github.com/repos/doctrine/doctrine2/issues/6003","number":6003,"state":"open","locked":false,"title":"Expose `EntityPersister::count()` through `EntityRepository::count()`","user":{"login":"phansys","id":1231441,"avatar_url":"https://avatars.githubusercontent.com/u/1231441?v=3","gravatar_id":"","url":"https://api.github.com/users/phansys","html_url":"https://github.com/phansys","followers_url":"https://api.github.com/users/phansys/followers","following_url":"https://api.github.com/users/phansys/following{/other_user}","gists_url":"https://api.github.com/users/phansys/gists{/gist_id}","starred_url":"https://api.github.com/users/phansys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phansys/subscriptions","organizations_url":"https://api.github.com/users/phansys/orgs","repos_url":"https://api.github.com/users/phansys/repos","events_url":"https://api.github.com/users/phansys/events{/privacy}","received_events_url":"https://api.github.com/users/phansys/received_events","type":"User","site_admin":false},"body":"|Q            |A     |\r\n|---          |---   |\r\n|Branch       |master|\r\n|Bug fix?     |no    |\r\n|New feature? |yes   |\r\n|BC breaks?   |no    |\r\n|Deprecations?|no    |\r\n|Tests pass?  |yes   |\r\n|Fixed tickets|      |\r\n|License      |MIT   |\r\n|Doc PR       |      |\r\n                      \r\n\r\n**TODO:**\r\n- [x] Add tests.\r\n- [x] Add documentation.","created_at":"2016-09-02T18:44:39Z","updated_at":"2016-09-07T22:30:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3bb816d5f6e5eb705090ee91bd1f13670efc9d55","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003/commits","review_comments_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003/comments","review_comment_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/issues/6003/comments","statuses_url":"https://api.github.com/repos/doctrine/doctrine2/statuses/fe0b4057a8b98912759eb8687c0a2addf519b188","head":{"label":"phansys:entity_repo_count","ref":"entity_repo_count","sha":"fe0b4057a8b98912759eb8687c0a2addf519b188","user":{"login":"phansys","id":1231441,"avatar_url":"https://avatars.githubusercontent.com/u/1231441?v=3","gravatar_id":"","url":"https://api.github.com/users/phansys","html_url":"https://github.com/phansys","followers_url":"https://api.github.com/users/phansys/followers","following_url":"https://api.github.com/users/phansys/following{/other_user}","gists_url":"https://api.github.com/users/phansys/gists{/gist_id}","starred_url":"https://api.github.com/users/phansys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phansys/subscriptions","organizations_url":"https://api.github.com/users/phansys/orgs","repos_url":"https://api.github.com/users/phansys/repos","events_url":"https://api.github.com/users/phansys/events{/privacy}","received_events_url":"https://api.github.com/users/phansys/received_events","type":"User","site_admin":false},"repo":{"id":23481067,"name":"doctrine2","full_name":"phansys/doctrine2","owner":{"login":"phansys","id":1231441,"avatar_url":"https://avatars.githubusercontent.com/u/1231441?v=3","gravatar_id":"","url":"https://api.github.com/users/phansys","html_url":"https://github.com/phansys","followers_url":"https://api.github.com/users/phansys/followers","following_url":"https://api.github.com/users/phansys/following{/other_user}","gists_url":"https://api.github.com/users/phansys/gists{/gist_id}","starred_url":"https://api.github.com/users/phansys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phansys/subscriptions","organizations_url":"https://api.github.com/users/phansys/orgs","repos_url":"https://api.github.com/users/phansys/repos","events_url":"https://api.github.com/users/phansys/events{/privacy}","received_events_url":"https://api.github.com/users/phansys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phansys/doctrine2","description":"Doctrine 2 Object Relational Mapper","fork":true,"url":"https://api.github.com/repos/phansys/doctrine2","forks_url":"https://api.github.com/repos/phansys/doctrine2/forks","keys_url":"https://api.github.com/repos/phansys/doctrine2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phansys/doctrine2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phansys/doctrine2/teams","hooks_url":"https://api.github.com/repos/phansys/doctrine2/hooks","issue_events_url":"https://api.github.com/repos/phansys/doctrine2/issues/events{/number}","events_url":"https://api.github.com/repos/phansys/doctrine2/events","assignees_url":"https://api.github.com/repos/phansys/doctrine2/assignees{/user}","branches_url":"https://api.github.com/repos/phansys/doctrine2/branches{/branch}","tags_url":"https://api.github.com/repos/phansys/doctrine2/tags","blobs_url":"https://api.github.com/repos/phansys/doctrine2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phansys/doctrine2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phansys/doctrine2/git/refs{/sha}","trees_url":"https://api.github.com/repos/phansys/doctrine2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phansys/doctrine2/statuses/{sha}","languages_url":"https://api.github.com/repos/phansys/doctrine2/languages","stargazers_url":"https://api.github.com/repos/phansys/doctrine2/stargazers","contributors_url":"https://api.github.com/repos/phansys/doctrine2/contributors","subscribers_url":"https://api.github.com/repos/phansys/doctrine2/subscribers","subscription_url":"https://api.github.com/repos/phansys/doctrine2/subscription","commits_url":"https://api.github.com/repos/phansys/doctrine2/commits{/sha}","git_commits_url":"https://api.github.com/repos/phansys/doctrine2/git/commits{/sha}","comments_url":"https://api.github.com/repos/phansys/doctrine2/comments{/number}","issue_comment_url":"https://api.github.com/repos/phansys/doctrine2/issues/comments{/number}","contents_url":"https://api.github.com/repos/phansys/doctrine2/contents/{+path}","compare_url":"https://api.github.com/repos/phansys/doctrine2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phansys/doctrine2/merges","archive_url":"https://api.github.com/repos/phansys/doctrine2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phansys/doctrine2/downloads","issues_url":"https://api.github.com/repos/phansys/doctrine2/issues{/number}","pulls_url":"https://api.github.com/repos/phansys/doctrine2/pulls{/number}","milestones_url":"https://api.github.com/repos/phansys/doctrine2/milestones{/number}","notifications_url":"https://api.github.com/repos/phansys/doctrine2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phansys/doctrine2/labels{/name}","releases_url":"https://api.github.com/repos/phansys/doctrine2/releases{/id}","deployments_url":"https://api.github.com/repos/phansys/doctrine2/deployments","created_at":"2014-08-30T00:06:38Z","updated_at":"2014-08-30T01:50:22Z","pushed_at":"2016-09-07T22:24:48Z","git_url":"git://github.com/phansys/doctrine2.git","ssh_url":"git@github.com:phansys/doctrine2.git","clone_url":"https://github.com/phansys/doctrine2.git","svn_url":"https://github.com/phansys/doctrine2","homepage":"http://www.doctrine-project.org","size":26667,"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":"master"}},"base":{"label":"doctrine:master","ref":"master","sha":"31a0c02b066764ec7b55eedc5f3cab78235a4e4b","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":597887,"name":"doctrine2","full_name":"doctrine/doctrine2","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/doctrine2","description":"Doctrine 2 Object Relational Mapper (ORM)","fork":false,"url":"https://api.github.com/repos/doctrine/doctrine2","forks_url":"https://api.github.com/repos/doctrine/doctrine2/forks","keys_url":"https://api.github.com/repos/doctrine/doctrine2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/doctrine2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/doctrine2/teams","hooks_url":"https://api.github.com/repos/doctrine/doctrine2/hooks","issue_events_url":"https://api.github.com/repos/doctrine/doctrine2/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/doctrine2/events","assignees_url":"https://api.github.com/repos/doctrine/doctrine2/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/doctrine2/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/doctrine2/tags","blobs_url":"https://api.github.com/repos/doctrine/doctrine2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/doctrine2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/doctrine2/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/doctrine2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/doctrine2/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/doctrine2/languages","stargazers_url":"https://api.github.com/repos/doctrine/doctrine2/stargazers","contributors_url":"https://api.github.com/repos/doctrine/doctrine2/contributors","subscribers_url":"https://api.github.com/repos/doctrine/doctrine2/subscribers","subscription_url":"https://api.github.com/repos/doctrine/doctrine2/subscription","commits_url":"https://api.github.com/repos/doctrine/doctrine2/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/doctrine2/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/doctrine2/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/doctrine2/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/doctrine2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/doctrine2/merges","archive_url":"https://api.github.com/repos/doctrine/doctrine2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/doctrine2/downloads","issues_url":"https://api.github.com/repos/doctrine/doctrine2/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/doctrine2/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/doctrine2/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/doctrine2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/doctrine2/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/doctrine2/releases{/id}","deployments_url":"https://api.github.com/repos/doctrine/doctrine2/deployments","created_at":"2010-04-06T21:42:59Z","updated_at":"2016-09-07T03:03:58Z","pushed_at":"2016-09-07T22:24:48Z","git_url":"git://github.com/doctrine/doctrine2.git","ssh_url":"git@github.com:doctrine/doctrine2.git","clone_url":"https://github.com/doctrine/doctrine2.git","svn_url":"https://github.com/doctrine/doctrine2","homepage":"http://www.doctrine-project.org","size":38372,"stargazers_count":3210,"watchers_count":3210,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1563,"mirror_url":null,"open_issues_count":1112,"forks":1563,"open_issues":1112,"watchers":3210,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003"},"html":{"href":"https://github.com/doctrine/doctrine2/pull/6003"},"issue":{"href":"https://api.github.com/repos/doctrine/doctrine2/issues/6003"},"comments":{"href":"https://api.github.com/repos/doctrine/doctrine2/issues/6003/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/6003/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/doctrine2/statuses/fe0b4057a8b98912759eb8687c0a2addf519b188"}}}}
{"actor":{"display_login":"Ocramius"}}