From 7212f16700f765f9acd9681d945401a7ba81081a Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 3 Mar 2016 19:29:11 -0800 Subject: [PATCH 1/4] php: fix examples ClientStub constructor --- examples/php/greeter_client.php | 4 +++- examples/php/route_guide/route_guide_client.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/php/greeter_client.php b/examples/php/greeter_client.php index e5e4c2651e9..718ef88c644 100644 --- a/examples/php/greeter_client.php +++ b/examples/php/greeter_client.php @@ -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 3cd1df72541..2f9533be4b7 100644 --- a/examples/php/route_guide/route_guide_client.php +++ b/examples/php/route_guide/route_guide_client.php @@ -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(); From 40202158fddf89d16b0e638d9cf415489e948926 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 3 Mar 2016 21:16:39 -0800 Subject: [PATCH 2/4] fix copyright --- examples/php/greeter_client.php | 2 +- examples/php/route_guide/route_guide_client.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/php/greeter_client.php b/examples/php/greeter_client.php index 718ef88c644..3fab14f33e1 100644 --- a/examples/php/greeter_client.php +++ b/examples/php/greeter_client.php @@ -1,7 +1,7 @@ Date: Mon, 7 Mar 2016 16:09:21 -0800 Subject: [PATCH 3/4] one more --- src/php/tests/generated_code/math_client.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/php/tests/generated_code/math_client.php b/src/php/tests/generated_code/math_client.php index 76ccabc0684..b8652ceb088 100644 --- a/src/php/tests/generated_code/math_client.php +++ b/src/php/tests/generated_code/math_client.php @@ -43,7 +43,9 @@ function p($line) $host = 'localhost:50051'; p("Connecting to host: $host"); -$client = new math\MathClient($host, []); +$client = new math\MathClient($host, [ + 'credentials' => Grpc\ChannelCredentials::createInsecure() +]); p('Client class: '.get_class($client)); p(''); From cfad24393931706e667554a867aa98a6c88236ea Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 8 Mar 2016 08:41:08 -0800 Subject: [PATCH 4/4] fixed copyright --- src/php/tests/generated_code/math_client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/tests/generated_code/math_client.php b/src/php/tests/generated_code/math_client.php index b8652ceb088..2085560d19e 100644 --- a/src/php/tests/generated_code/math_client.php +++ b/src/php/tests/generated_code/math_client.php @@ -1,7 +1,7 @@