PHP: update examples
diff --git a/examples/php/greeter_client.php b/examples/php/greeter_client.php
index a5c0865..986a4bb 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();