{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/188805939","pull_request_review_id":120859519,"id":188805939,"diff_hunk":"@@ -69,6 +69,18 @@ public function __construct($hostname, $opts, $channel = null)\n             return;\n         }\n \n+        $this->channel = static::getDefaultChannel($opts);\n+    }\n+\n+    /**\n+     * Creates and returns the default Channel\n+     *\n+     * @param array $opts Channel constructor options\n+     *\n+     * @return Channel The channel\n+     */\n+    public static function getDefaultChannel(array $opts)","path":"src/php/lib/Grpc/BaseStub.php","position":14,"original_position":14,"commit_id":"31676f36b1c58543697a9ea5e2a84961601b8156","original_commit_id":"31676f36b1c58543697a9ea5e2a84961601b8156","user":{"login":"chingor13","id":32483,"avatar_url":"https://avatars0.githubusercontent.com/u/32483?v=4","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false},"body":"ah, yes, forgot `$hostname`","created_at":"2018-05-17T00:00:54Z","updated_at":"2018-05-17T00:00:54Z","html_url":"https://github.com/grpc/grpc/pull/15417#discussion_r188805939","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/15417","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/188805939"},"html":{"href":"https://github.com/grpc/grpc/pull/15417#discussion_r188805939"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/15417"}},"in_reply_to_id":188805555},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/15417","id":188590362,"html_url":"https://github.com/grpc/grpc/pull/15417","diff_url":"https://github.com/grpc/grpc/pull/15417.diff","patch_url":"https://github.com/grpc/grpc/pull/15417.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/15417","number":15417,"state":"open","locked":false,"title":"PHP: Surface a static method to fetch the default Channel","user":{"login":"chingor13","id":32483,"avatar_url":"https://avatars0.githubusercontent.com/u/32483?v=4","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false},"body":"Prior to having access to interceptors, a developer didn't care about the default Channel created.\r\n\r\nIf you are using interceptors and you want to use and interceptor with the default channel you would have to replicate the code in the BaseStub constructor.\r\n\r\nThis PR exposes a static method `BaseStub::getDefaultChannel(array $opts)` that can be used to fetch the default channel so that a developer can wrap the channel with an interceptor.\r\n\r\n@ZhouyihaiDing ","created_at":"2018-05-16T23:50:07Z","updated_at":"2018-05-17T00:00:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c27174fae4f357bcbfb1af360bd52bf6402ea89","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/15417/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/15417/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/15417/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/31676f36b1c58543697a9ea5e2a84961601b8156","head":{"label":"chingor13:php-default-channel","ref":"php-default-channel","sha":"31676f36b1c58543697a9ea5e2a84961601b8156","user":{"login":"chingor13","id":32483,"avatar_url":"https://avatars0.githubusercontent.com/u/32483?v=4","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false},"repo":{"id":133720764,"name":"grpc","full_name":"chingor13/grpc","owner":{"login":"chingor13","id":32483,"avatar_url":"https://avatars0.githubusercontent.com/u/32483?v=4","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chingor13/grpc","description":"The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/chingor13/grpc","forks_url":"https://api.github.com/repos/chingor13/grpc/forks","keys_url":"https://api.github.com/repos/chingor13/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chingor13/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chingor13/grpc/teams","hooks_url":"https://api.github.com/repos/chingor13/grpc/hooks","issue_events_url":"https://api.github.com/repos/chingor13/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/chingor13/grpc/events","assignees_url":"https://api.github.com/repos/chingor13/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/chingor13/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/chingor13/grpc/tags","blobs_url":"https://api.github.com/repos/chingor13/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chingor13/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chingor13/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/chingor13/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chingor13/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/chingor13/grpc/languages","stargazers_url":"https://api.github.com/repos/chingor13/grpc/stargazers","contributors_url":"https://api.github.com/repos/chingor13/grpc/contributors","subscribers_url":"https://api.github.com/repos/chingor13/grpc/subscribers","subscription_url":"https://api.github.com/repos/chingor13/grpc/subscription","commits_url":"https://api.github.com/repos/chingor13/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/chingor13/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/chingor13/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/chingor13/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/chingor13/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/chingor13/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chingor13/grpc/merges","archive_url":"https://api.github.com/repos/chingor13/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chingor13/grpc/downloads","issues_url":"https://api.github.com/repos/chingor13/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/chingor13/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/chingor13/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/chingor13/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chingor13/grpc/labels{/name}","releases_url":"https://api.github.com/repos/chingor13/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/chingor13/grpc/deployments","created_at":"2018-05-16T20:41:23Z","updated_at":"2018-05-16T20:41:38Z","pushed_at":"2018-05-16T23:45:36Z","git_url":"git://github.com/chingor13/grpc.git","ssh_url":"git@github.com:chingor13/grpc.git","clone_url":"https://github.com/chingor13/grpc.git","svn_url":"https://github.com/chingor13/grpc","homepage":"https://grpc.io","size":180473,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"bc946acd7e089f85228de977849e1d9d5eb5a718","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"name":"grpc","full_name":"grpc/grpc","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc/deployments","created_at":"2014-12-08T18:58:53Z","updated_at":"2018-05-16T23:26:12Z","pushed_at":"2018-05-16T23:56:43Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"https://grpc.io","size":180637,"stargazers_count":15276,"watchers_count":15276,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":3397,"mirror_url":null,"archived":false,"open_issues_count":1021,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":3397,"open_issues":1021,"watchers":15276,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/15417"},"html":{"href":"https://github.com/grpc/grpc/pull/15417"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/15417"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/15417/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/15417/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/15417/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/31676f36b1c58543697a9ea5e2a84961601b8156"}},"author_association":"NONE"}}
{"actor":{"display_login":"chingor13"}}