Skip to content
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

Merged
merged 1 commit into from
Dec 16, 2015

Conversation

stanley-cheung
Copy link
Contributor

  • Make ChannelCredentials::createInsecure() explicit
  • Now $opts['credentials'] is required to create a BaseStub. So at least client needs to be created with $opts['credentials'] = Grpc\ChannelCredentials::createInsecure();

credentials createInsecure explicit
@grpc-kokoro
Copy link

Can one of the admins verify this patch?

@jboeuf
Copy link
Contributor

jboeuf commented Dec 16, 2015

Sorry @stanley-cheung can you recreate the PR against the release-0.12 branch? Thanks much!

@stanley-cheung
Copy link
Contributor Author

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.

@jboeuf
Copy link
Contributor

jboeuf commented Dec 16, 2015

It looks like we still allow the creation of a cleartext channel without parameters. See line 151 here:
https://github.com/grpc/grpc/pull/4487/files#diff-f942bdda09aac4a837cef783506850f0L151

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?

@stanley-cheung
Copy link
Contributor Author

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 BaseStub class. So I am comfortable leaving this in for now. Can turn that into a better error case in the future.

@jboeuf
Copy link
Contributor

jboeuf commented Dec 16, 2015

LGTM. Merging.

jboeuf added a commit that referenced this pull request Dec 16, 2015
PHP: make ChannelCredentials::createInsecure explicit
@jboeuf jboeuf merged commit 62ae50d into grpc:master Dec 16, 2015
@stanley-cheung
Copy link
Contributor Author

Thanks for the review!

@stanley-cheung stanley-cheung deleted the php_insecure_channel_creds branch December 17, 2015 00:16
@jboeuf
Copy link
Contributor

jboeuf commented Dec 17, 2015

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
wrote:

Thanks for the review!


Reply to this email directly or view it on GitHub
#4487 (comment).

@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants