Skip to content

v0.2.3

Choose a tag to compare

@github-actions github-actions released this 11 May 12:27
6187fca

What's Changed

  • Honor grpc.max_receive_message_length and grpc.max_send_message_length channel options — These channel args are now mapped to tonic's max_decoding_message_size and max_encoding_message_size. Without this fix, tonic's default 4 MiB decoding limit applied to all calls regardless of the PHP-side configuration, causing `"decoded message length too large"` errors on legitimate large responses. The C-based ext-grpc honors these natively; this brings grpc-php-rs to parity. Thanks @jumper423 in #10.

Usage

\$channel = new \\Grpc\\Channel('localhost:50051', [
    'credentials' => \\Grpc\\ChannelCredentials::createInsecure(),
    'grpc.max_receive_message_length' => 128 * 1024 * 1024,  // 128 MiB
    'grpc.max_send_message_length' => -1,                     // unlimited
]);

Semantics:

  • Value `0` or unset → tonic default (4 MiB decoding, unlimited encoding)
  • Value `-1` → unlimited
  • Value `> 0` → exact byte limit

New Contributors

Full Changelog: v0.2.2...v0.2.3