aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-01-17 08:13:14 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-17 08:13:14 -0800
commitaecd46eb3c1ddaa38a14863312da800df4175259 (patch)
treed7a32f8c6cbfebcbe6be5619dae7f3078a99a2f5 /src/php
parent28ea6f0fbc1a48e092d92e7619a332598ce39941 (diff)
parentcc2e048e84eaa418cab393553594a3fefb891037 (diff)
Merge github.com:grpc/grpc into metadata_filter
Diffstat (limited to 'src/php')
-rwxr-xr-xsrc/php/bin/generate_proto_php.sh22
-rw-r--r--src/php/lib/Grpc/BaseStub.php6
2 files changed, 17 insertions, 11 deletions
diff --git a/src/php/bin/generate_proto_php.sh b/src/php/bin/generate_proto_php.sh
index c558bc5769..416fa9df97 100755
--- a/src/php/bin/generate_proto_php.sh
+++ b/src/php/bin/generate_proto_php.sh
@@ -39,10 +39,13 @@ protoc --proto_path=src/proto/math \
# replace the Empty message with EmptyMessage
# because Empty is a PHP reserved word
-sed -i 's/message Empty/message EmptyMessage/g' \
- src/proto/grpc/testing/empty.proto
-sed -i 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
- src/proto/grpc/testing/test.proto
+output_file=$(mktemp)
+sed 's/message Empty/message EmptyMessage/g' \
+ src/proto/grpc/testing/empty.proto > $output_file
+mv $output_file ./src/proto/grpc/testing/empty.proto
+sed 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
+ src/proto/grpc/testing/test.proto > $output_file
+mv $output_file ./src/proto/grpc/testing/test.proto
protoc --proto_path=. \
--php_out=src/php/tests/interop \
@@ -53,7 +56,10 @@ protoc --proto_path=. \
src/proto/grpc/testing/test.proto
# change it back
-sed -i 's/message EmptyMessage/message Empty/g' \
- src/proto/grpc/testing/empty.proto
-sed -i 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
- src/proto/grpc/testing/test.proto
+sed 's/message EmptyMessage/message Empty/g' \
+ src/proto/grpc/testing/empty.proto > $output_file
+mv $output_file ./src/proto/grpc/testing/empty.proto
+sed 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
+ src/proto/grpc/testing/test.proto > $output_file
+mv $output_file ./src/proto/grpc/testing/test.proto
+
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index aec60af094..a9e77b9396 100644
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -271,7 +271,7 @@ class BaseStub
* @return ClientStreamingSurfaceActiveCall The active call object
*/
public function _clientStreamRequest($method,
- callable $deserialize,
+ $deserialize,
array $metadata = [],
array $options = [])
{
@@ -307,7 +307,7 @@ class BaseStub
*/
public function _serverStreamRequest($method,
$argument,
- callable $deserialize,
+ $deserialize,
array $metadata = [],
array $options = [])
{
@@ -340,7 +340,7 @@ class BaseStub
* @return BidiStreamingSurfaceActiveCall The active call object
*/
public function _bidiRequest($method,
- callable $deserialize,
+ $deserialize,
array $metadata = [],
array $options = [])
{