spiral/grpc-client
Lightweight, extensible PHP gRPC client with a Guzzle-like API. Supports standalone use or Spiral integration, configurable via DTOs, includes interceptors (timeouts, retries), and rich exceptions for error handling. Requires the PHP gRPC extension.
Microservices & API Modernization:
Resilience & Observability:
Real-Time Systems:
OrderCreated → gRPC stream → downstream services) for event sourcing or CQRS patterns.Multi-Protocol Backends:
Developer Experience:
Adopt When:
Look Elsewhere When:
pecl install grpc) or protobuf compiler (protoc) in your deployment pipeline.For Executives: "This package lets us modernize internal APIs with gRPC—cutting latency by up to 10x for high-frequency calls (e.g., payments, fraud checks) while adding resilience features like automatic retries. It’s a drop-in replacement for custom gRPC logic, reducing dev time by 30%+ and aligning with our microservices roadmap. Since it’s MIT-licensed and maintained by the Spiral team, we avoid vendor lock-in while gaining enterprise-grade reliability."
For Engineering Leads:
"The interceptor pipeline (retries, timeouts, auth) replaces spaghetti retry logic in our Laravel services with declarative config. For example, adding exponential backoff for a payment gateway is now one line (RetryInterceptor::createConfig()). It also integrates seamlessly with RoadRunner (if we’re using it) or works standalone. The protobuf-first approach forces us to design APIs better upfront—no more over-fetching data like REST."
For Developers:
"No more wrestling with raw grpc_* PHP functions—this gives us a Guzzle-like API for gRPC. Want to call a service? Just do $client->service(ProtobufInterface::class)->method(). Need retries? Add an interceptor. Need TLS? One config object. And since it’s immutable, we can safely pre-configure clients for different environments (dev/staging/prod) without side effects. Plus, the standalone mode works even if we’re not using Spiral."
How can I help you explore Laravel packages today?