diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index e745ec3709f..ff293c0709c 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -33,10 +33,10 @@ class BaseStub { * @param array $metadata A metadata map to send to the server * @return SimpleSurfaceActiveCall The active call object */ - protected function _simpleRequest($method, - $argument, - callable $deserialize, - $metadata = array()) { + public function _simpleRequest($method, + $argument, + callable $deserialize, + $metadata = array()) { return new SimpleSurfaceActiveCall($this->channel, $method, $deserialize, @@ -55,10 +55,10 @@ class BaseStub { * @param array $metadata A metadata map to send to the server * @return ClientStreamingSurfaceActiveCall The active call object */ - protected function _clientStreamRequest($method, - $arguments, - callable $deserialize, - $metadata = array()) { + public function _clientStreamRequest($method, + $arguments, + callable $deserialize, + $metadata = array()) { return new ClientStreamingSurfaceActiveCall($this->channel, $method, $deserialize, @@ -76,10 +76,10 @@ class BaseStub { * @param array $metadata A metadata map to send to the server * @return ServerStreamingSurfaceActiveCall The active call object */ - protected function _serverStreamRequest($method, - $argument, - callable $deserialize, - $metadata = array()) { + public function _serverStreamRequest($method, + $argument, + callable $deserialize, + $metadata = array()) { return new ServerStreamingSurfaceActiveCall($this->channel, $method, $deserialize, @@ -95,9 +95,9 @@ class BaseStub { * @param array $metadata A metadata map to send to the server * @return BidiStreamingSurfaceActiveCall The active call object */ - protected function _bidiRequest($method, - callable $deserialize, - $metadata = array()) { + public function _bidiRequest($method, + callable $deserialize, + $metadata = array()) { return new BidiStreamingSurfaceActiveCall($this->channel, $method, $deserialize, diff --git a/src/php/tests/interop/empty.php b/src/php/tests/interop/empty.php index 3e4968fcc3e..22b11803b67 100755 --- a/src/php/tests/interop/empty.php +++ b/src/php/tests/interop/empty.php @@ -1,7 +1,7 @@ 'foo.test.google.com', - 'credentials' => $credentials - ]); + new Grpc\BaseStub( + $server_address, + [ + 'grpc.ssl_target_name_override' => 'foo.test.google.com', + 'credentials' => $credentials + ])); echo "Connecting to $server_address\n"; echo "Running test case $args[test_case]\n"; diff --git a/src/php/tests/interop/messages.php b/src/php/tests/interop/messages.php index bbdd296452e..129c96fa136 100755 --- a/src/php/tests/interop/messages.php +++ b/src/php/tests/interop/messages.php @@ -1,7 +1,7 @@ rpc_impl = $rpc_impl; + } /** * @param grpc\testing\EmptyMessage $input - * @return grpc\testing\EmptyMessage */ public function EmptyCall(\grpc\testing\EmptyMessage $argument, $metadata = array()) { - return $this->_simpleRequest('/grpc.testing.TestService/EmptyCall', $argument, '\grpc\testing\EmptyMessage::deserialize', $metadata); + return $this->rpc_impl->_simpleRequest('/grpc.testing.TestService/EmptyCall', $argument, '\grpc\testing\EmptyMessage::deserialize', $metadata); } /** * @param grpc\testing\SimpleRequest $input - * @return grpc\testing\SimpleResponse */ public function UnaryCall(\grpc\testing\SimpleRequest $argument, $metadata = array()) { - return $this->_simpleRequest('/grpc.testing.TestService/UnaryCall', $argument, '\grpc\testing\SimpleResponse::deserialize', $metadata); + return $this->rpc_impl->_simpleRequest('/grpc.testing.TestService/UnaryCall', $argument, '\grpc\testing\SimpleResponse::deserialize', $metadata); } /** * @param grpc\testing\StreamingOutputCallRequest $input - * @return grpc\testing\StreamingOutputCallResponse */ public function StreamingOutputCall($argument, $metadata = array()) { - return $this->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall', $argument, '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata); + return $this->rpc_impl->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall', $argument, '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata); } /** * @param grpc\testing\StreamingInputCallRequest $input - * @return grpc\testing\StreamingInputCallResponse */ public function StreamingInputCall($arguments, $metadata = array()) { - return $this->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall', $arguments, '\grpc\testing\StreamingInputCallResponse::deserialize', $metadata); + return $this->rpc_impl->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall', $arguments, '\grpc\testing\StreamingInputCallResponse::deserialize', $metadata); } /** * @param grpc\testing\StreamingOutputCallRequest $input - * @return grpc\testing\StreamingOutputCallResponse */ public function FullDuplexCall($metadata = array()) { - return $this->_bidiRequest('/grpc.testing.TestService/FullDuplexCall', '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata); + return $this->rpc_impl->_bidiRequest('/grpc.testing.TestService/FullDuplexCall', '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata); } /** * @param grpc\testing\StreamingOutputCallRequest $input - * @return grpc\testing\StreamingOutputCallResponse */ public function HalfDuplexCall($metadata = array()) { - return $this->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall', '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata); + return $this->rpc_impl->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall', '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata); } } }