The official ext-grpc has several known issues in threaded PHP environments:
- ZTS/TSRM segfaults — the C gRPC core's event_engine threads call
_emalloc without TSRM context, causing SIGSEGV on FrankenPHP and other ZTS SAPIs (grpc#41526, frankenphp#2235)
- OpenSSL/BoringSSL conflicts — the bundled BoringSSL collides with PHP's OpenSSL, breaking
ext-curl and other extensions
- Mutex deadlocks on PHP 8.5 (grpc#41526)
- Stack overflow regression in grpc 1.69 (#8015)
grpc-php-rs is a drop-in replacement that solves these issues. It uses the same Grpc\ namespace API, so no code changes are needed for google-cloud-php users.
Pre-built binaries for PHP 8.2–8.5, Linux (x86_64/ARM64, NTS/ZTS) and macOS ARM64.
Would it be useful to mention this as an alternative in GRPC.md for users running into these issues?