google/grpc-gcp
GCP-specific extensions for gRPC, providing additional features and supporting infrastructure such as end-to-end tests and benchmarks for accessing Google Cloud APIs with gRPC client libraries. See the src directory for extension implementations.
google/cloud-* SDKs are suboptimal.GcpServiceProvider) to expose gRPC clients as facades (e.g., Firestore::query()), mirroring Eloquent’s syntax.grpc_php_plugin and protoc, which can be containerized (Docker) or automated via Laravel’s bootstrap/compiled.php.google/cloud packages (e.g., google/cloud-firestore). Solution: Use composer aliases or custom repositories to isolate gRPC-specific dependencies.GOOGLE_APPLICATION_CREDENTIALS) and google/auth library, but may need custom validation in Laravel’s AppServiceProvider.grpc.so and protobuf.so, which must be enabled in php.ini or Dockerized (e.g., FROM php:8.2-cli with extensions pre-installed).| Risk Area | Mitigation Strategy |
|---|---|
| Protobuf Compilation | Automate via Laravel’s post-install-cmd or Docker multi-stage builds. |
| PHP Extension Compatibility | Test with Laravel’s supported PHP versions (8.1+) and use php:8.2-cli in CI/CD. |
| GCP Service Support | Validate target GCP services (e.g., Firestore, Pub/Sub) are covered in googleapis. |
| Streaming Complexity | Use Laravel’s events or queues to abstract gRPC streaming logic. |
| Error Handling | Wrap gRPC calls in Laravel’s try-catch and log errors via Log::error(). |
| Performance Overhead | Benchmark against REST APIs; gRPC should outperform for high-frequency calls. |
google/auth or custom vault integration?)google/cloud-* packages, or supplement them?ProblemDetails?)Grpc\ChannelCredentials.)FirestoreClient).Gcp\Firestore::query().dispatch(new ProcessOrder)->onConnection('gcp-pubsub')).Firestore::listen('orders', fn($order) => broadcast(new OrderUpdated($order)))).grpc.so (gRPC-PHP extension).protobuf.so (Protobuf support).google/auth (for credentials).grpc_php_plugin (build from source or use pre-built binaries).php:8.2-cli with extensions).googleapis repo.php.ini or Dockerfile.GOOGLE_APPLICATION_CREDENTIALS).GcpServiceProvider) to bind gRPC clients.Firestore, PubSub) for Eloquent-like usage.Grpc\Mock\MockClient.| Component | Compatibility Notes |
|---|---|
| Laravel | Works with Laravel 9+ (PHP 8.1+). Avoid PHP 7.4 due to dropped support. |
| GCP Services | Supports services with published .proto files in googleapis repo. |
| PHP Extensions | Requires grpc.so and protobuf.so (tested on Linux; Windows support limited). |
| Protobuf v5 | Mandatory for PHP 8.1+; aligns with Laravel’s modern PHP stack. |
| PSR Standards | Supports PSR-16/17 caching; integrates with Laravel’s cache drivers. |
| Docker | Recommended for cross-environment consistency (protobuf compilation + PHP). |
googleapis repo.Dockerfile/php.ini.GcpServiceProvider and facades.googleapis repo for .proto file changes; regenerate files as needed.grpc.so/protobuf.so releases (e.g., PHP 8.4 fixes).composer.lock to pin google/grpc-gcp and google/cloud versions.GRPC_VERBOSITY=DEBUG.Grpc\Channel::getState() to check connection status.Log::debug() for RPC payloads/errors.GOOGLE_APPLICATION_CREDENTIALS path.How can I help you explore Laravel packages today?