add psr-4 autoload

using "Helloworld","GPBMetadata" classes by composer autoload
pull/22986/head
jeffreyqw 5 years ago
parent ab3f66f6cb
commit 3c944f7ae0
  1. 4
      examples/php/composer.json
  2. 5
      examples/php/greeter_client.php

@ -7,7 +7,9 @@
},
"autoload": {
"psr-4": {
"": "route_guide/"
"": "route_guide/",
"GPBMetadata\\": "GPBMetadata/",
"Helloworld\\": "Helloworld/"
}
}
}

@ -21,11 +21,6 @@
require dirname(__FILE__).'/vendor/autoload.php';
@include_once dirname(__FILE__).'/Helloworld/GreeterClient.php';
@include_once dirname(__FILE__).'/Helloworld/HelloReply.php';
@include_once dirname(__FILE__).'/Helloworld/HelloRequest.php';
@include_once dirname(__FILE__).'/GPBMetadata/Helloworld.php';
function greet($name)
{
$client = new Helloworld\GreeterClient('localhost:50051', [

Loading…
Cancel
Save