aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/lib/Grpc/BaseStub.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/lib/Grpc/BaseStub.php')
-rwxr-xr-xsrc/php/lib/Grpc/BaseStub.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index 8e9dedf73b..2de1b337e5 100755
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -72,6 +72,11 @@ class BaseStub
}
$opts['grpc.primary_user_agent'] .=
'grpc-php/'.$package_config['version'];
+ if (!array_key_exists('credentials', $opts)) {
+ throw new \Exception("The opts['credentials'] key is now ".
+ 'required. Please see one of the '.
+ 'ChannelCredentials::create methods');
+ }
$this->channel = new Channel($hostname, $opts);
}