aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/php/greeter_client.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/php/greeter_client.php')
-rw-r--r--examples/php/greeter_client.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/php/greeter_client.php b/examples/php/greeter_client.php
index a5c0865393..986a4bbb85 100644
--- a/examples/php/greeter_client.php
+++ b/examples/php/greeter_client.php
@@ -33,14 +33,18 @@
*/
require dirname(__FILE__).'/vendor/autoload.php';
-require dirname(__FILE__).'/helloworld.php';
+
+// The following includes are needed when using protobuf 3.1.0
+// and will suppress warnings when using protobuf 3.2.0+
+@include_once dirname(__FILE__).'/helloworld.pb.php';
+@include_once dirname(__FILE__).'/helloworld_grpc_pb.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 = new Helloworld\HelloRequest();
$request->setName($name);
list($reply, $status) = $client->SayHello($request)->wait();
$message = $reply->getMessage();