{"action":"created","comment":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/210921234","pull_request_review_id":147238991,"id":210921234,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDkyMTIzNA==","diff_hunk":"@@ -298,6 +301,11 @@ protected function calculateCacheKey()\n         if ($this->varyByRoute) {\n             $key[] = Yii::$app->requestedRoute;\n         }\n+        foreach ($this->variations as &$variation) {\n+            if ($variation instanceof \\Closure) {\n+                $variation = call_user_func($variation, $this);\n+            }\n+        }","path":"framework/filters/PageCache.php","position":44,"original_position":44,"commit_id":"12727c920c929210c90b2ee6f049103251283956","original_commit_id":"12727c920c929210c90b2ee6f049103251283956","user":{"login":"rob006","id":5972388,"node_id":"MDQ6VXNlcjU5NzIzODg=","avatar_url":"https://avatars2.githubusercontent.com/u/5972388?v=4","gravatar_id":"","url":"https://api.github.com/users/rob006","html_url":"https://github.com/rob006","followers_url":"https://api.github.com/users/rob006/followers","following_url":"https://api.github.com/users/rob006/following{/other_user}","gists_url":"https://api.github.com/users/rob006/gists{/gist_id}","starred_url":"https://api.github.com/users/rob006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob006/subscriptions","organizations_url":"https://api.github.com/users/rob006/orgs","repos_url":"https://api.github.com/users/rob006/repos","events_url":"https://api.github.com/users/rob006/events{/privacy}","received_events_url":"https://api.github.com/users/rob006/received_events","type":"User","site_admin":false},"body":"I don't think that we should modify `$this->variations` directly. This will create non-obvious side effect.","created_at":"2018-08-17T14:09:31Z","updated_at":"2018-08-17T14:09:42Z","html_url":"https://github.com/yiisoft/yii2/pull/16650#discussion_r210921234","pull_request_url":"https://api.github.com/repos/yiisoft/yii2/pulls/16650","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/210921234"},"html":{"href":"https://github.com/yiisoft/yii2/pull/16650#discussion_r210921234"},"pull_request":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/16650"}}},"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/16650","id":209128594,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MTI4NTk0","html_url":"https://github.com/yiisoft/yii2/pull/16650","diff_url":"https://github.com/yiisoft/yii2/pull/16650.diff","patch_url":"https://github.com/yiisoft/yii2/pull/16650.patch","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/16650","number":16650,"state":"open","locked":false,"title":"Allow usage of Closures in yii\\filters\\PageCache for enabled and variations","user":{"login":"C4RoCKeT","id":3056188,"node_id":"MDQ6VXNlcjMwNTYxODg=","avatar_url":"https://avatars2.githubusercontent.com/u/3056188?v=4","gravatar_id":"","url":"https://api.github.com/users/C4RoCKeT","html_url":"https://github.com/C4RoCKeT","followers_url":"https://api.github.com/users/C4RoCKeT/followers","following_url":"https://api.github.com/users/C4RoCKeT/following{/other_user}","gists_url":"https://api.github.com/users/C4RoCKeT/gists{/gist_id}","starred_url":"https://api.github.com/users/C4RoCKeT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C4RoCKeT/subscriptions","organizations_url":"https://api.github.com/users/C4RoCKeT/orgs","repos_url":"https://api.github.com/users/C4RoCKeT/repos","events_url":"https://api.github.com/users/C4RoCKeT/events{/privacy}","received_events_url":"https://api.github.com/users/C4RoCKeT/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Is bugfix?    | no\r\n| New feature?  | yes\r\n| Breaks BC?    | no\r\n| Fixed issues  | #16649\r\n","created_at":"2018-08-17T12:08:24Z","updated_at":"2018-08-17T14:09:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7031fdaa0fbb10ecb2f02854521f793cb668338f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yiisoft/yii2/pulls/16650/commits","review_comments_url":"https://api.github.com/repos/yiisoft/yii2/pulls/16650/comments","review_comment_url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/16650/comments","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/12727c920c929210c90b2ee6f049103251283956","head":{"label":"C4RoCKeT:master","ref":"master","sha":"12727c920c929210c90b2ee6f049103251283956","user":{"login":"C4RoCKeT","id":3056188,"node_id":"MDQ6VXNlcjMwNTYxODg=","avatar_url":"https://avatars2.githubusercontent.com/u/3056188?v=4","gravatar_id":"","url":"https://api.github.com/users/C4RoCKeT","html_url":"https://github.com/C4RoCKeT","followers_url":"https://api.github.com/users/C4RoCKeT/followers","following_url":"https://api.github.com/users/C4RoCKeT/following{/other_user}","gists_url":"https://api.github.com/users/C4RoCKeT/gists{/gist_id}","starred_url":"https://api.github.com/users/C4RoCKeT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C4RoCKeT/subscriptions","organizations_url":"https://api.github.com/users/C4RoCKeT/orgs","repos_url":"https://api.github.com/users/C4RoCKeT/repos","events_url":"https://api.github.com/users/C4RoCKeT/events{/privacy}","received_events_url":"https://api.github.com/users/C4RoCKeT/received_events","type":"User","site_admin":false},"repo":{"id":145108280,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxMDgyODA=","name":"yii2","full_name":"C4RoCKeT/yii2","owner":{"login":"C4RoCKeT","id":3056188,"node_id":"MDQ6VXNlcjMwNTYxODg=","avatar_url":"https://avatars2.githubusercontent.com/u/3056188?v=4","gravatar_id":"","url":"https://api.github.com/users/C4RoCKeT","html_url":"https://github.com/C4RoCKeT","followers_url":"https://api.github.com/users/C4RoCKeT/followers","following_url":"https://api.github.com/users/C4RoCKeT/following{/other_user}","gists_url":"https://api.github.com/users/C4RoCKeT/gists{/gist_id}","starred_url":"https://api.github.com/users/C4RoCKeT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C4RoCKeT/subscriptions","organizations_url":"https://api.github.com/users/C4RoCKeT/orgs","repos_url":"https://api.github.com/users/C4RoCKeT/repos","events_url":"https://api.github.com/users/C4RoCKeT/events{/privacy}","received_events_url":"https://api.github.com/users/C4RoCKeT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/C4RoCKeT/yii2","description":"Yii 2: The Fast, Secure and Professional PHP Framework","fork":true,"url":"https://api.github.com/repos/C4RoCKeT/yii2","forks_url":"https://api.github.com/repos/C4RoCKeT/yii2/forks","keys_url":"https://api.github.com/repos/C4RoCKeT/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/C4RoCKeT/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/C4RoCKeT/yii2/teams","hooks_url":"https://api.github.com/repos/C4RoCKeT/yii2/hooks","issue_events_url":"https://api.github.com/repos/C4RoCKeT/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/C4RoCKeT/yii2/events","assignees_url":"https://api.github.com/repos/C4RoCKeT/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/C4RoCKeT/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/C4RoCKeT/yii2/tags","blobs_url":"https://api.github.com/repos/C4RoCKeT/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/C4RoCKeT/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/C4RoCKeT/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/C4RoCKeT/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/C4RoCKeT/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/C4RoCKeT/yii2/languages","stargazers_url":"https://api.github.com/repos/C4RoCKeT/yii2/stargazers","contributors_url":"https://api.github.com/repos/C4RoCKeT/yii2/contributors","subscribers_url":"https://api.github.com/repos/C4RoCKeT/yii2/subscribers","subscription_url":"https://api.github.com/repos/C4RoCKeT/yii2/subscription","commits_url":"https://api.github.com/repos/C4RoCKeT/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/C4RoCKeT/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/C4RoCKeT/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/C4RoCKeT/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/C4RoCKeT/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/C4RoCKeT/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/C4RoCKeT/yii2/merges","archive_url":"https://api.github.com/repos/C4RoCKeT/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/C4RoCKeT/yii2/downloads","issues_url":"https://api.github.com/repos/C4RoCKeT/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/C4RoCKeT/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/C4RoCKeT/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/C4RoCKeT/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/C4RoCKeT/yii2/labels{/name}","releases_url":"https://api.github.com/repos/C4RoCKeT/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/C4RoCKeT/yii2/deployments","created_at":"2018-08-17T10:40:13Z","updated_at":"2018-08-17T12:06:18Z","pushed_at":"2018-08-17T12:06:14Z","git_url":"git://github.com/C4RoCKeT/yii2.git","ssh_url":"git@github.com:C4RoCKeT/yii2.git","clone_url":"https://github.com/C4RoCKeT/yii2.git","svn_url":"https://github.com/C4RoCKeT/yii2","homepage":"http://www.yiiframework.com","size":70239,"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":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yiisoft:master","ref":"master","sha":"9e5c4abdb8d99811b8c4fdc5dc376e22c9f0d662","user":{"login":"yiisoft","id":993323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MzMyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/993323?v=4","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"repo":{"id":3431193,"node_id":"MDEwOlJlcG9zaXRvcnkzNDMxMTkz","name":"yii2","full_name":"yiisoft/yii2","owner":{"login":"yiisoft","id":993323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MzMyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/993323?v=4","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yiisoft/yii2","description":"Yii 2: The Fast, Secure and Professional PHP Framework","fork":false,"url":"https://api.github.com/repos/yiisoft/yii2","forks_url":"https://api.github.com/repos/yiisoft/yii2/forks","keys_url":"https://api.github.com/repos/yiisoft/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yiisoft/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yiisoft/yii2/teams","hooks_url":"https://api.github.com/repos/yiisoft/yii2/hooks","issue_events_url":"https://api.github.com/repos/yiisoft/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/yiisoft/yii2/events","assignees_url":"https://api.github.com/repos/yiisoft/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/yiisoft/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/yiisoft/yii2/tags","blobs_url":"https://api.github.com/repos/yiisoft/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yiisoft/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yiisoft/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yiisoft/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/yiisoft/yii2/languages","stargazers_url":"https://api.github.com/repos/yiisoft/yii2/stargazers","contributors_url":"https://api.github.com/repos/yiisoft/yii2/contributors","subscribers_url":"https://api.github.com/repos/yiisoft/yii2/subscribers","subscription_url":"https://api.github.com/repos/yiisoft/yii2/subscription","commits_url":"https://api.github.com/repos/yiisoft/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yiisoft/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yiisoft/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yiisoft/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yiisoft/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/yiisoft/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yiisoft/yii2/merges","archive_url":"https://api.github.com/repos/yiisoft/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yiisoft/yii2/downloads","issues_url":"https://api.github.com/repos/yiisoft/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/yiisoft/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/yiisoft/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/yiisoft/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yiisoft/yii2/labels{/name}","releases_url":"https://api.github.com/repos/yiisoft/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/yiisoft/yii2/deployments","created_at":"2012-02-13T15:32:36Z","updated_at":"2018-08-17T13:24:46Z","pushed_at":"2018-08-17T12:08:25Z","git_url":"git://github.com/yiisoft/yii2.git","ssh_url":"git@github.com:yiisoft/yii2.git","clone_url":"https://github.com/yiisoft/yii2.git","svn_url":"https://github.com/yiisoft/yii2","homepage":"http://www.yiiframework.com","size":70155,"stargazers_count":12218,"watchers_count":12218,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6600,"mirror_url":null,"archived":false,"open_issues_count":1039,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":6600,"open_issues":1039,"watchers":12218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/16650"},"html":{"href":"https://github.com/yiisoft/yii2/pull/16650"},"issue":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/16650"},"comments":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/16650/comments"},"review_comments":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/16650/comments"},"review_comment":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/16650/commits"},"statuses":{"href":"https://api.github.com/repos/yiisoft/yii2/statuses/12727c920c929210c90b2ee6f049103251283956"}},"author_association":"NONE"}}
{"actor":{"display_login":"rob006"}}