-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: make ChannelCredentials::createInsecure explicit #4487
Conversation
credentials createInsecure explicit
Can one of the admins verify this patch? |
Sorry @stanley-cheung can you recreate the PR against the release-0.12 branch? Thanks much! |
hm, I wasn't able to. There are some conflicts that I couldn't resolve atm. Looks like my previous changes haven't made it to the release-0_12 branch yet. I was hoping that I made all my PR against master at the moment and sync-up with Nico later to make sure they are all included in the release-0_12 branch, hopefully by tomorrow. |
It looks like we still allow the creation of a cleartext channel without parameters. See line 151 here: I'm worried that something like // Create an implicit insecure client.
$client = new helloworld\GreeterClient('greeter.googleapis.com'); may just work. Am I missing something? |
User will not be able to get past this: https://github.com/grpc/grpc/pull/4487/files#diff-1ec67cc27b64c683db99bcd198866532R75 The PHP extension is not intended to be used directly without the |
LGTM. Merging. |
PHP: make ChannelCredentials::createInsecure explicit
Thanks for the review! |
You're very welcome. Can you update the doc with the new API? Thanks much! On Wed, Dec 16, 2015 at 4:02 PM, Stanley Cheung notifications@github.com
|
ChannelCredentials::createInsecure()
explicit$opts['credentials']
is required to create aBaseStub
. So at least client needs to be created with$opts['credentials'] = Grpc\ChannelCredentials::createInsecure();