{"action":"created","comment":{"url":"https://api.github.com/repos/api-platform/core/pulls/comments/158800737","pull_request_review_id":85658456,"id":158800737,"diff_hunk":"@@ -195,4 +122,77 @@ public function getSubresource(string $resourceClass, array $identifiers, array\n \n         return $context['collection'] ? $query->getResult() : $query->getOneOrNullResult();\n     }\n+\n+    /**\n+     * @throws RuntimeException\n+     */\n+    private function buildQuery(array $identifiers, array $context, QueryNameGenerator $queryNameGenerator, QueryBuilder $previousQueryBuilder, string $previousAlias, int $remainingIdentifiers, QueryBuilder $topQueryBuilder = null): QueryBuilder\n+    {\n+        if (!$remainingIdentifiers) {","path":"src/Bridge/Doctrine/Orm/SubresourceDataProvider.php","position":113,"original_position":113,"commit_id":"5b23e18e4aa29d80018a7db26403ec685352f0a5","original_commit_id":"5b23e18e4aa29d80018a7db26403ec685352f0a5","user":{"login":"alanpoulain","id":10920253,"avatar_url":"https://avatars1.githubusercontent.com/u/10920253?v=4","gravatar_id":"","url":"https://api.github.com/users/alanpoulain","html_url":"https://github.com/alanpoulain","followers_url":"https://api.github.com/users/alanpoulain/followers","following_url":"https://api.github.com/users/alanpoulain/following{/other_user}","gists_url":"https://api.github.com/users/alanpoulain/gists{/gist_id}","starred_url":"https://api.github.com/users/alanpoulain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanpoulain/subscriptions","organizations_url":"https://api.github.com/users/alanpoulain/orgs","repos_url":"https://api.github.com/users/alanpoulain/repos","events_url":"https://api.github.com/users/alanpoulain/events{/privacy}","received_events_url":"https://api.github.com/users/alanpoulain/received_events","type":"User","site_admin":false},"body":"I think it's clearer this way. Because if `--` is done here it's more the position of the identifier and not the remaining ones. And you have to add the operation `$remainingIdentifiers + 1` where there is `$remainingIdentifiers`. WDYT?","created_at":"2017-12-27T11:29:44Z","updated_at":"2017-12-27T11:29:44Z","html_url":"https://github.com/api-platform/core/pull/1608#discussion_r158800737","pull_request_url":"https://api.github.com/repos/api-platform/core/pulls/1608","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments/158800737"},"html":{"href":"https://github.com/api-platform/core/pull/1608#discussion_r158800737"},"pull_request":{"href":"https://api.github.com/repos/api-platform/core/pulls/1608"}},"in_reply_to_id":158780544},"pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/1608","id":160142679,"html_url":"https://github.com/api-platform/core/pull/1608","diff_url":"https://github.com/api-platform/core/pull/1608.diff","patch_url":"https://github.com/api-platform/core/pull/1608.patch","issue_url":"https://api.github.com/repos/api-platform/core/issues/1608","number":1608,"state":"open","locked":false,"title":"Fix Doctrine query for nested subresources","user":{"login":"alanpoulain","id":10920253,"avatar_url":"https://avatars1.githubusercontent.com/u/10920253?v=4","gravatar_id":"","url":"https://api.github.com/users/alanpoulain","html_url":"https://github.com/alanpoulain","followers_url":"https://api.github.com/users/alanpoulain/followers","following_url":"https://api.github.com/users/alanpoulain/following{/other_user}","gists_url":"https://api.github.com/users/alanpoulain/gists{/gist_id}","starred_url":"https://api.github.com/users/alanpoulain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanpoulain/subscriptions","organizations_url":"https://api.github.com/users/alanpoulain/orgs","repos_url":"https://api.github.com/users/alanpoulain/repos","events_url":"https://api.github.com/users/alanpoulain/events{/privacy}","received_events_url":"https://api.github.com/users/alanpoulain/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #1442\r\n| License       | MIT\r\n| Doc PR        |\r\n\r\nFix the build of the Doctrine query for subresources nested in more than 2 levels of depth.\r\nUse a recursive function instead of a while loop.","created_at":"2017-12-26T15:49:15Z","updated_at":"2017-12-27T11:29:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d0a72ae6fe2e5851e5855a7703978bd4beaea70","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/api-platform/core/pulls/1608/commits","review_comments_url":"https://api.github.com/repos/api-platform/core/pulls/1608/comments","review_comment_url":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/api-platform/core/issues/1608/comments","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/5b23e18e4aa29d80018a7db26403ec685352f0a5","head":{"label":"alanpoulain:fix/recursive-subresources","ref":"fix/recursive-subresources","sha":"5b23e18e4aa29d80018a7db26403ec685352f0a5","user":{"login":"alanpoulain","id":10920253,"avatar_url":"https://avatars1.githubusercontent.com/u/10920253?v=4","gravatar_id":"","url":"https://api.github.com/users/alanpoulain","html_url":"https://github.com/alanpoulain","followers_url":"https://api.github.com/users/alanpoulain/followers","following_url":"https://api.github.com/users/alanpoulain/following{/other_user}","gists_url":"https://api.github.com/users/alanpoulain/gists{/gist_id}","starred_url":"https://api.github.com/users/alanpoulain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanpoulain/subscriptions","organizations_url":"https://api.github.com/users/alanpoulain/orgs","repos_url":"https://api.github.com/users/alanpoulain/repos","events_url":"https://api.github.com/users/alanpoulain/events{/privacy}","received_events_url":"https://api.github.com/users/alanpoulain/received_events","type":"User","site_admin":false},"repo":{"id":102495629,"name":"core","full_name":"alanpoulain/core","owner":{"login":"alanpoulain","id":10920253,"avatar_url":"https://avatars1.githubusercontent.com/u/10920253?v=4","gravatar_id":"","url":"https://api.github.com/users/alanpoulain","html_url":"https://github.com/alanpoulain","followers_url":"https://api.github.com/users/alanpoulain/followers","following_url":"https://api.github.com/users/alanpoulain/following{/other_user}","gists_url":"https://api.github.com/users/alanpoulain/gists{/gist_id}","starred_url":"https://api.github.com/users/alanpoulain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanpoulain/subscriptions","organizations_url":"https://api.github.com/users/alanpoulain/orgs","repos_url":"https://api.github.com/users/alanpoulain/repos","events_url":"https://api.github.com/users/alanpoulain/events{/privacy}","received_events_url":"https://api.github.com/users/alanpoulain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alanpoulain/core","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":true,"url":"https://api.github.com/repos/alanpoulain/core","forks_url":"https://api.github.com/repos/alanpoulain/core/forks","keys_url":"https://api.github.com/repos/alanpoulain/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alanpoulain/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alanpoulain/core/teams","hooks_url":"https://api.github.com/repos/alanpoulain/core/hooks","issue_events_url":"https://api.github.com/repos/alanpoulain/core/issues/events{/number}","events_url":"https://api.github.com/repos/alanpoulain/core/events","assignees_url":"https://api.github.com/repos/alanpoulain/core/assignees{/user}","branches_url":"https://api.github.com/repos/alanpoulain/core/branches{/branch}","tags_url":"https://api.github.com/repos/alanpoulain/core/tags","blobs_url":"https://api.github.com/repos/alanpoulain/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alanpoulain/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alanpoulain/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/alanpoulain/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alanpoulain/core/statuses/{sha}","languages_url":"https://api.github.com/repos/alanpoulain/core/languages","stargazers_url":"https://api.github.com/repos/alanpoulain/core/stargazers","contributors_url":"https://api.github.com/repos/alanpoulain/core/contributors","subscribers_url":"https://api.github.com/repos/alanpoulain/core/subscribers","subscription_url":"https://api.github.com/repos/alanpoulain/core/subscription","commits_url":"https://api.github.com/repos/alanpoulain/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/alanpoulain/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/alanpoulain/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/alanpoulain/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/alanpoulain/core/contents/{+path}","compare_url":"https://api.github.com/repos/alanpoulain/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alanpoulain/core/merges","archive_url":"https://api.github.com/repos/alanpoulain/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alanpoulain/core/downloads","issues_url":"https://api.github.com/repos/alanpoulain/core/issues{/number}","pulls_url":"https://api.github.com/repos/alanpoulain/core/pulls{/number}","milestones_url":"https://api.github.com/repos/alanpoulain/core/milestones{/number}","notifications_url":"https://api.github.com/repos/alanpoulain/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alanpoulain/core/labels{/name}","releases_url":"https://api.github.com/repos/alanpoulain/core/releases{/id}","deployments_url":"https://api.github.com/repos/alanpoulain/core/deployments","created_at":"2017-09-05T15:03:02Z","updated_at":"2017-09-05T15:03:04Z","pushed_at":"2017-12-26T17:06:35Z","git_url":"git://github.com/alanpoulain/core.git","ssh_url":"git@github.com:alanpoulain/core.git","clone_url":"https://github.com/alanpoulain/core.git","svn_url":"https://github.com/alanpoulain/core","homepage":"https://api-platform.com","size":7334,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"api-platform:2.1","ref":"2.1","sha":"0218f782a8808f49ace7652b143b4ada0c557139","user":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars3.githubusercontent.com/u/13420081?v=4","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":29501260,"name":"core","full_name":"api-platform/core","owner":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars3.githubusercontent.com/u/13420081?v=4","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/api-platform/core","description":"The server component of API Platform: hypermedia and GraphQL APIs in minutes","fork":false,"url":"https://api.github.com/repos/api-platform/core","forks_url":"https://api.github.com/repos/api-platform/core/forks","keys_url":"https://api.github.com/repos/api-platform/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/api-platform/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/api-platform/core/teams","hooks_url":"https://api.github.com/repos/api-platform/core/hooks","issue_events_url":"https://api.github.com/repos/api-platform/core/issues/events{/number}","events_url":"https://api.github.com/repos/api-platform/core/events","assignees_url":"https://api.github.com/repos/api-platform/core/assignees{/user}","branches_url":"https://api.github.com/repos/api-platform/core/branches{/branch}","tags_url":"https://api.github.com/repos/api-platform/core/tags","blobs_url":"https://api.github.com/repos/api-platform/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/api-platform/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/api-platform/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/api-platform/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/{sha}","languages_url":"https://api.github.com/repos/api-platform/core/languages","stargazers_url":"https://api.github.com/repos/api-platform/core/stargazers","contributors_url":"https://api.github.com/repos/api-platform/core/contributors","subscribers_url":"https://api.github.com/repos/api-platform/core/subscribers","subscription_url":"https://api.github.com/repos/api-platform/core/subscription","commits_url":"https://api.github.com/repos/api-platform/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/api-platform/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/api-platform/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/api-platform/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/api-platform/core/contents/{+path}","compare_url":"https://api.github.com/repos/api-platform/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/api-platform/core/merges","archive_url":"https://api.github.com/repos/api-platform/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/api-platform/core/downloads","issues_url":"https://api.github.com/repos/api-platform/core/issues{/number}","pulls_url":"https://api.github.com/repos/api-platform/core/pulls{/number}","milestones_url":"https://api.github.com/repos/api-platform/core/milestones{/number}","notifications_url":"https://api.github.com/repos/api-platform/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/api-platform/core/labels{/name}","releases_url":"https://api.github.com/repos/api-platform/core/releases{/id}","deployments_url":"https://api.github.com/repos/api-platform/core/deployments","created_at":"2015-01-19T23:05:56Z","updated_at":"2017-12-26T21:02:18Z","pushed_at":"2017-12-27T10:22:36Z","git_url":"git://github.com/api-platform/core.git","ssh_url":"git@github.com:api-platform/core.git","clone_url":"https://github.com/api-platform/core.git","svn_url":"https://github.com/api-platform/core","homepage":"https://api-platform.com","size":7351,"stargazers_count":556,"watchers_count":556,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"archived":false,"open_issues_count":173,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":199,"open_issues":173,"watchers":556,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/1608"},"html":{"href":"https://github.com/api-platform/core/pull/1608"},"issue":{"href":"https://api.github.com/repos/api-platform/core/issues/1608"},"comments":{"href":"https://api.github.com/repos/api-platform/core/issues/1608/comments"},"review_comments":{"href":"https://api.github.com/repos/api-platform/core/pulls/1608/comments"},"review_comment":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/api-platform/core/pulls/1608/commits"},"statuses":{"href":"https://api.github.com/repos/api-platform/core/statuses/5b23e18e4aa29d80018a7db26403ec685352f0a5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alanpoulain"}}