Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Mar 08:48

Full gRPC Streaming Support

This release adds complete streaming support, making grpc-php-rs a true drop-in replacement for the C-based ext/grpc extension. All four gRPC call types are now fully supported.

Streaming

  • Server streamingServerStreamingCall now works correctly. A background tokio task drives the tonic response stream and communicates with PHP via channels, allowing multiple startBatch([RECV_MESSAGE]) calls to read messages one at a time.
  • Client streamingClientStreamingCall sends multiple messages over a single HTTP/2 stream. Each startBatch([SEND_MESSAGE]) pushes through an mpsc channel to the tonic request stream.
  • Bidi streamingBidiStreamingCall supports interleaved send and receive on the same stream. Both client and bidi streaming use tonic::client::Grpc::streaming() under the hood.

Bug Fixes

  • Empty protobuf responses return "" instead of null — RPCs returning 0-byte messages (e.g. google.protobuf.Empty) now return an empty string, matching the C extension behavior. Fixes issues with Google Cloud PHP libraries like PubSub and Spanner. (thanks @dkkoma, #8)

Testing

  • Added CollectPayloads (client streaming) and BidiEcho (bidi streaming) RPCs to the test server
  • Added streaming tests covering all three streaming patterns
  • Added empty response test
  • ./test.sh all now runs the full test suite: smoke, compat, grpc-gcp, streaming, and leak tests

New Contributors

  • @dkkoma made their first contribution in #8

Full Changelog: v0.1.9...v0.2.0