aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/lib/Grpc/BaseStub.php
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-26 12:55:47 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-26 12:55:47 -0700
commitd9aed1d0103122c235c5577f7a00ead9cbc1a7b9 (patch)
treec28b50ccab7a19287984857daf40d552e50247ab /src/php/lib/Grpc/BaseStub.php
parent7cb085375581ff2b18865e4e72b335276d08d09d (diff)
parent5c575dd6e4b01cd68cca5d1917b58023dcf4ca0f (diff)
Merge github.com:grpc/grpc into elliptic-orange-chamelion
Conflicts: src/csharp/ext/grpc_csharp_ext.c
Diffstat (limited to 'src/php/lib/Grpc/BaseStub.php')
-rwxr-xr-xsrc/php/lib/Grpc/BaseStub.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index 48c00977eb..8c438e4bf9 100755
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -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);
}