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

Cloud Common Protos Laravel Package

google/cloud-common-protos

Generated PHP Protocol Buffer classes shared across Google Cloud APIs (part of google-cloud-php). Install via Composer as google/cloud-common-protos to use stable, Apache-2.0 licensed common proto message types in your apps.

View on GitHub
Deep Wiki
Context7
  // Example: Bind a LoggingClient with protobuf-backed audit logs
  $this->app->singleton(LoggingClient::class, function ($app) {
      return new LoggingClient(['projectId' => config('services.google.cloud.project')]);
  });
  • Observability: Use protobuf types (e.g., Google\Logging\Type\HttpRequest) to enrich Laravel logs with HTTP metadata:
    $logEntry = new LogEntry();
    $logEntry->setHttpRequest(new HttpRequest([
        'requestUrl' => request()->fullUrl(),
        'requestMethod' => request()->method(),
        'userAgent' => request()->userAgent(),
    ]));
    
  • gRPC Services: For custom gRPC endpoints, define protobuf schemas in .proto files and generate PHP classes using this package’s dependencies.

Key Considerations:

  • Dependencies: Requires google/protobuf (PHP extension) and grpc/grpc for gRPC. Test in your CI/CD pipeline.
  • Schema Evolution: Monitor Google’s protobuf releases for breaking changes (e.g., deprecated fields like ReservationResourceUsage).
  • Performance: Protobuf is binary and efficient—ideal for high-throughput services but overkill for simple REST APIs.

When to Avoid:

  • If you’re only using REST APIs (e.g., Google Cloud Storage via HTTP), this package is unnecessary.
  • If your team lacks protobuf/gRPC experience, consider starting with REST SDKs or hiring expertise.

Next Steps:

  1. Evaluate Dependents: Check if your existing Google Cloud SDKs already include this package (they likely do).
  2. Test Integration: Verify protobuf extension support in your deployment environment.
  3. Document Use Cases: Align protobuf usage with your Laravel package’s roadmap (e.g., audit logging, gRPC microservices).
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.
amashukov/lnd-client-php
althinect/enum-permission
andydefer/laravel-actions
aimeos/prisma
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