Skip to content

Commit

Permalink
Fix various PHP bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Jan 12, 2017
1 parent 1b59bfc commit 122c687
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
21 changes: 13 additions & 8 deletions src/php/bin/generate_proto_php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ 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
sed 's/message Empty/message EmptyMessage/g' \
src/proto/grpc/testing/empty.proto > empty.proto
mv empty.proto ./src/proto/grpc/testing
sed 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
src/proto/grpc/testing/test.proto > test.proto
mv test.proto ./src/proto/grpc/testing

protoc --proto_path=. \
--php_out=src/php/tests/interop \
Expand All @@ -53,7 +55,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 > empty.proto
mv empty.proto ./src/proto/grpc/testing
sed 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
src/proto/grpc/testing/test.proto > test.proto
mv test.proto ./src/proto/grpc/testing

6 changes: 3 additions & 3 deletions src/php/lib/Grpc/BaseStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function _simpleRequest($method,
* @return ClientStreamingSurfaceActiveCall The active call object
*/
public function _clientStreamRequest($method,
callable $deserialize,
$deserialize,
array $metadata = [],
array $options = [])
{
Expand Down Expand Up @@ -307,7 +307,7 @@ public function _clientStreamRequest($method,
*/
public function _serverStreamRequest($method,
$argument,
callable $deserialize,
$deserialize,
array $metadata = [],
array $options = [])
{
Expand Down Expand Up @@ -340,7 +340,7 @@ public function _serverStreamRequest($method,
* @return BidiStreamingSurfaceActiveCall The active call object
*/
public function _bidiRequest($method,
callable $deserialize,
$deserialize,
array $metadata = [],
array $options = [])
{
Expand Down

0 comments on commit 122c687

Please sign in to comment.