Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Grpc Gcp Laravel Package

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.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Grpc Gcp
How do I integrate **google/grpc-gcp** with Laravel for Firestore real-time updates?
Use the gRPC Firestore client to stream data, then wrap it in a Laravel service provider. Bind the client as a singleton and expose a facade (e.g., `Firestore::listen()`) to emit Laravel events or broadcast updates via `Broadcast::channel()`. Ensure your Docker setup includes `grpc.so` and `protobuf.so` for PHP.
Can I replace **google/cloud-firestore** with **google/grpc-gcp** in Laravel?
Yes, but you’ll need to generate protobuf files for Firestore from the [googleapis repo](https://github.com/googleapis/googleapis) and replace REST calls with gRPC. Benchmark performance first—gRPC excels in high-frequency operations but requires upfront setup. Use Laravel’s service container to bind the gRPC client alongside the old SDK.
What Laravel versions and PHP extensions are required for **google/grpc-gcp**?
The package supports Laravel 8+ (PHP 8.1+) and requires `grpc.so` and `protobuf.so` extensions. Test with PHP 8.2+ in Docker or CI/CD pipelines. Add these to your `php.ini` or use a Docker image like `php:8.2-cli` with extensions pre-installed via `docker-php-ext-enable`.
How do I handle GCP credentials in Laravel with **google/grpc-gcp**?
Leverage Laravel’s environment variables (e.g., `GOOGLE_APPLICATION_CREDENTIALS`) and the `google/auth` library for credential loading. Validate paths in `AppServiceProvider@boot()` and cache credentials in Laravel’s cache. For production, use a secrets manager or Docker secrets to avoid hardcoding.
Will **google/grpc-gcp** work with Laravel’s queue system for Pub/Sub?
Absolutely. Use the gRPC Pub/Sub client to push Laravel jobs to a queue, then process them via `dispatch(new ProcessOrder())->onConnection('gcp-pubsub')`. Wrap the gRPC subscriber in a Laravel queue worker (e.g., `php artisan queue:work --queue=gcp-pubsub`) for async handling.
How do I generate protobuf files for custom GCP services in Laravel?
Clone the [googleapis repo](https://github.com/googleapis/googleapis), then compile protobuf files using `grpc_php_plugin` in a Docker container or Laravel’s `post-install-cmd` script. Add the generated files to your project’s `src/Generated` directory and autoload them in `composer.json`.
Are there alternatives to **google/grpc-gcp** for Laravel + GCP?
Yes, but with trade-offs. The **google/cloud-* SDKs** (e.g., `google/cloud-firestore`) use REST under the hood and are easier to set up, but gRPC offers lower latency for high-throughput apps. For hybrid setups, use both: gRPC for performance-critical paths and REST for simplicity elsewhere.
How do I debug gRPC errors in Laravel with **google/grpc-gcp**?
Wrap gRPC calls in Laravel’s `try-catch` blocks and log errors with `Log::error($e->getMessage())`. For structured errors, extend Laravel’s `ProblemDetails` or create custom exceptions (e.g., `GcpGrpcException`). Enable gRPC logging in your Docker setup with `GRPC_VERBOSITY=DEBUG`.
Can I use **google/grpc-gcp** for Laravel broadcasting with Firestore?
Yes, but you’ll need to manually implement a `FirestoreChannel` class that listens to Firestore gRPC streams and emits Laravel events. Use `Broadcast::channel()` to tie Firestore documents to Laravel channels, then push updates via `Firestore::listen()`. Test with Laravel’s `php artisan queue:listen` for real-time validation.
What’s the best way to containerize **google/grpc-gcp** for Laravel?
Use a multi-stage Docker build to compile protobuf files in a `protoc` container, then copy the generated PHP classes to your Laravel app’s `vendor/` directory. Extend the `php:8.2-cli` image with `grpc.so` and `protobuf.so` via `docker-php-ext-install`. Mount Laravel’s `storage/` and `bootstrap/cache/` for persistence.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky