diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2016-03-14 08:59:28 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2016-03-14 08:59:28 -0700 |
commit | fca9464d8ccc3c99d34a7370c821f6f3b5917ce1 (patch) | |
tree | 11d7ce4f2f3202738d7038efc1bf9416656aabfa /examples/php | |
parent | 231233271349a8c57cf306bcc8329783da38e512 (diff) | |
parent | cfad24393931706e667554a867aa98a6c88236ea (diff) |
Merge pull request #5583 from stanley-cheung/php-fix-examples-constructor
PHP: fix examples ClientStub constructor
Diffstat (limited to 'examples/php')
-rw-r--r-- | examples/php/greeter_client.php | 6 | ||||
-rw-r--r-- | examples/php/route_guide/route_guide_client.php | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/examples/php/greeter_client.php b/examples/php/greeter_client.php index e5e4c2651e..3fab14f33e 100644 --- a/examples/php/greeter_client.php +++ b/examples/php/greeter_client.php @@ -1,7 +1,7 @@ <?php /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,9 @@ require dirname(__FILE__) . '/vendor/autoload.php'; require dirname(__FILE__) . '/helloworld.php'; function greet($name) { - $client = new helloworld\GreeterClient('localhost:50051', []); + $client = new helloworld\GreeterClient('localhost:50051', [ + 'credentials' => Grpc\ChannelCredentials::createInsecure() + ]); $request = new helloworld\HelloRequest(); $request->setName($name); list($reply, $status) = $client->SayHello($request)->wait(); diff --git a/examples/php/route_guide/route_guide_client.php b/examples/php/route_guide/route_guide_client.php index 3cd1df7254..cc8640cf70 100644 --- a/examples/php/route_guide/route_guide_client.php +++ b/examples/php/route_guide/route_guide_client.php @@ -1,7 +1,7 @@ <?php /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,9 @@ require dirname(__FILE__) . '/route_guide.php'; define('COORD_FACTOR', 1e7); -$client = new routeguide\RouteGuideClient('localhost:50051', []); +$client = new routeguide\RouteGuideClient('localhost:50051', [ + 'credentials' => Grpc\ChannelCredentials::createInsecure() +]); function printFeature($feature) { $name = $feature->getName(); |