Merge pull request #2649 from stanley-cheung/php_user_agent

Add user-agent for PHP
pull/2647/head^2
Michael Lumish 9 years ago
commit 6aff7aa335
  1. 1
      composer.json
  2. 2
      src/php/composer.json
  3. 5
      src/php/lib/Grpc/BaseStub.php

@ -2,6 +2,7 @@
"name": "grpc/grpc",
"type": "library",
"description": "gRPC library for PHP",
"version": "0.5.1",
"keywords": ["rpc"],
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",

@ -1,7 +1,7 @@
{
"name": "grpc/grpc",
"description": "gRPC library for PHP",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",
"repositories": [

@ -60,7 +60,10 @@ class BaseStub {
}
unset($opts['update_metadata']);
}
$package_config = json_decode(
file_get_contents(dirname(__FILE__) . '/../../composer.json'), true);
$opts['grpc.primary_user_agent'] =
'grpc-php/' . $package_config['version'];
$this->channel = new Channel($hostname, $opts);
}

Loading…
Cancel
Save