google/shopping-common-protos
google/shopping-common-protos provides generated PHP protobuf classes for Google Shopping shared message types. It supplies common data structures used by Google Shopping APIs and related PHP libraries, simplifying protobuf request and response handling. A low-level dependency, not a standalone clie...
What this package actually is. google/shopping-common-protos is a Composer package of PHP classes generated by protoc from Google's Shopping API .proto definitions. It contains shared message types (e.g. google.shopping.type.* — destinations, channels, price/availability enums) and no service clients, no transport, no auth. On its own it cannot call any Google API. Its purpose is to be a transitive dependency of the real client libraries (google/shopping-merchant-*, google/shopping-css-*, google/shopping-merchant-reports, etc.).
Architecture fit. Poor fit as a direct dependency; good fit as plumbing. In a Laravel application the natural integration is:
Laravel domain layer
└── google/shopping-merchant-<resource> (GAPIC client, REST or gRPC)
└── google/shopping-common-protos (value objects only)
└── google/protobuf
If a TPM is evaluating this package in isolation, the correct conclusion is: do not add it directly. Add the service package you actually need and let Composer resolve this one. The exception is when you write adapter code that type-hints against google.shopping.type.* messages independent of any client — legitimate, but rare.
Integration feasibility. Low friction mechanically: one composer require, PSR-4 autoloading, framework-agnostic, no service provider, no config, no migrations, no runtime side effects. Constraints to verify before committing:
google/protobuf (with ext-protobuf strongly preferred; the pure-PHP fallback is materially slower).google/gax + PSR-18/PSR-7 HTTP client, or gRPC via ext-grpc. Laravel's HTTP client is not used by GAPIC clients — they need a PSR-18 implementation, so plan for symfony/http-client or guzzlehttp/guzzle explicitly.google/auth; credentials handling belongs in Laravel config/secret management, not in the package.Technical risk. The risk is not in this package's code (it is generated, deterministic, and effectively static) — it is in coupling and version skew:
| Risk | Severity | Mitigation |
|---|---|---|
Version skew between common-protos and a concrete shopping-merchant-* client (constructor signature or enum drift) |
High — fatal errors at runtime | Let the client own the constraint; never pin this package independently |
Conflicting google/protobuf or google/common-protos versions pulled by other Google SDKs in the same app |
Medium | Single composer update transaction, composer why-not checks in CI |
ext-protobuf absent in production → silent performance cliff |
Medium | Assert in a deploy health check |
| Generated-code churn across minor releases | Low | Automated regression tests on serialization round-trips |
| Upstream deprecation of legacy Content API surface vs. Merchant API | Medium | Confirm target API before designing the domain model |
| 1 star / 0 dependents / score ~17.6 | Informational only | This is expected for generated proto plumbing; it is not a quality signal. Judge the parent GAPIC packages and Google's release notes instead |
Key questions to resolve before green-lighting.
merchantapi.googleapis.com) or the legacy Content API for Shopping v2.1? The former is the supported path and the reason these protos exist.google/protobuf?ext-grpc and ext-protobuf?Stack fit. Composer-native, framework-agnostic — compatible with Laravel 10/11/12 and any PHP 8.1+ runtime. It slots in below the application layer. Recommended placement:
google/shopping-merchant-products, -inventories, -reports, google/shopping-css, etc.).common-protos as an implicit, Composer-managed transitive dependency.App\Services\GoogleShopping adapter that returns your own DTOs / value objects.config/services.php + env, never in the package's own config.Migration path. If the organisation is on google/apiclient with Content API v2.1, this is a model migration, not a library swap. The Merchant API is proto/JSON-shaped and resource-oriented; field names, enums, and batch semantics differ from the old REST API. Sequence:
If this is a greenfield integration, skip migration entirely and go straight to the Merchant API.
Compatibility notes.
oneof fields surface as a single nullable property plus a getX() accessor; do not model them as nullable columns without a discriminator.Timestamp, Duration, Money) do not map cleanly to Laravel's Carbon/integer cents conventions — normalise at the adapter boundary.composer.lock and upgrade all Google packages in one PR; partial upgrades are the dominant failure mode.Sequencing (suggested 4 sprints).
common-protos directly).Maintenance. Low-touch but not zero-touch. The package is regenerated whenever Google's proto definitions change; releases can arrive frequently and contain additive or breaking generated-code changes. Policy: treat it as a third-party black box — never patch vendor code, never fork, pin via lockfile, and use Dependabot/Renovate with all google/* packages grouped into a single PR gated by the adapter's contract tests. Budget roughly one dependency-upgrade cycle per quarter plus reactive upgrades when a required field or resource appears.
Support. No commercial SLA on the package itself; GitHub Issues only. Escalation for API behaviour, quotas, or account issues goes through Google Cloud / Merchant Center support, which is a separate channel and a separate contract. Practically: the package will not "break" in the way a hand-written library does — it will simply be stale relative to the API. The real support burden lands on the service client packages and on Google's API-side changes, not here.
Scaling. This package is not on the hot path in any meaningful way — it is message construction and serialization. Scaling considerations live elsewhere:
ext-protobuf (and ext-grpc if using gRPC) on every web and worker node; the pure-PHP protobuf runtime is a measurable tax at volume.Failure modes and detection.
| Failure | Symptom | Detection |
|---|---|---|
| Dependency version skew | Error: Class not found / constructor type error at boot or first call |
CI install + container smoke test |
Missing ext-protobuf |
Silent latency increase, higher CPU | Deploy health check asserting extension presence |
| Auth/credential expiry | 401/403 from Google | Alert on auth error rate; rotate via secret manager |
| Quota exhaustion | 429 / RESOURCE_EXHAUSTED | Queue depth + 429-rate dashboard; exponential backoff with jitter |
| Generated-code drift after upgrade | Serialization errors, unexpected nulls on oneof |
Contract tests on request/response round-trips against sandbox |
| Legacy API deprecation | Sunset warnings, eventual hard failure | Track Google deprecation notices; the migration plan above is the mitigation |
| Partial writes | Product state divergence | Nightly reconciliation job comparing local state to Merchant Center |
Ramp-up. Installation and first successful call: hours. Productive, correct use: 2–4 weeks for a mid-level Laravel engineer. The learning curve is not Laravel — it is protobuf semantics (enums as constants, oneof handling, well-known types, absence-vs-default), GAPIC client conventions (pagination iterators, long-running operations, retry config), and Google's Merchant Center data model (accounts, sub-accounts, data sources, destinations, supplemental feeds). Recommend: one engineer owns the integration and the adapter boundary, all other engineers consume only the internal DTOs, and the proto classes never appear outside App\Services\GoogleShopping.
TPM bottom line. Green-light the capability (Merchant API integration) with a scoped spike; do not green-light google/shopping-common-protos as a named, directly-managed dependency. Its low adoption metrics are characteristic of generated proto plumbing and should not factor into the decision. Track it as a transitive dependency with automated upgrade hygiene, and place all architectural scrutiny on the service client selection, the quota/batching design, and the adapter boundary.
How can I help you explore Laravel packages today?