Weave 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

Cloud Common Protos Laravel Package

google/cloud-common-protos

PHP classes generated from the protocol buffer types shared across multiple Google Cloud APIs. Stable and backward-compatible, this Apache 2.0 licensed Composer package lets you depend on these common protos directly via composer require google/cloud-common-protos.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Cloud Common Protos
What is google/cloud-common-protos used for in a Laravel application?
It provides generated PHP classes for protocol buffer types shared by multiple Google Cloud APIs, such as google.rpc.Status, google.type.*, google.longrunning.Operation, audit-log messages, and HTTP-request messages. In a Laravel app it is usually plumbing: it lets your code or a Google Cloud SDK depend on one stable package for those common message shapes. It does not add routes, config, facades, or a service provider; it is a Composer library of DTO-like protobuf classes.
Do I need to require google/cloud-common-protos directly, or will a Google Cloud SDK pull it in?
Most google/cloud-* SDKs, including logging, pubsub, and trace, pull it in transitively, so you may never add it to composer.json yourself. Requiring it directly only makes sense when you need the common protobuf messages without a full Google Cloud SDK, for example to emit google.rpc.Status-shaped errors or build LogEntry structures. If it arrives transitively, your real decision is version governance rather than adoption.
How do I install google/cloud-common-protos in Laravel?
Run composer require google/cloud-common-protos, or add google/cloud-common-protos with the ^1.0 constraint to the require section of composer.json and run composer update. There is no Laravel package discovery step, no config file to publish, and no facade to register. The package is Apache 2.0 licensed and its classes are documented as stable and backwards-compatible.
Which version of google/protobuf does google/cloud-common-protos require?
Version 1.0.0 of google/cloud-common-protos requires google/protobuf v5, which is why the 1.0.0 release is called out as a breaking change. If another dependency in your Laravel project is pinned to protobuf ^3 or ^4, Composer will block the upgrade. Audit the tree with composer why google/protobuf before changing versions.
Does google/cloud-common-protos require the ext-protobuf or ext-grpc PHP extensions?
No, neither extension is required for basic use. The google/protobuf PHP runtime works in pure PHP, and ext-protobuf is an optional accelerator that can be materially faster but is not necessary. ext-grpc is only relevant if you call gRPC transports or run a gRPC server; REST/JSON usage through the standard Google Cloud SDKs does not need it.
Can I use google/cloud-common-protos without installing a full Google Cloud SDK?
Yes. That is one of the narrow cases where a direct dependency is justified: you can depend on the common protobuf message classes without pulling in logging, pubsub, or another full SDK. Typical examples include emitting google.rpc.Status-shaped error payloads from your own API or hand-building LogEntry structures. You still need the protobuf runtime, which Composer brings in.
How should I serialize google/cloud-common-protos messages to JSON in Laravel?
Do not assume protobuf messages will serialize like ordinary PHP arrays through json_encode or a Laravel JsonResource. Protobuf JSON mapping has its own rules: int64 values render as strings, field names are camelCase, and well-known types have special encodings. Use the protobuf JSON serializer and add contract tests around your API responses so Laravel response shaping does not leak the wrong payload format.
Can I use google/cloud-common-protos message classes as Eloquent models?
No, they are not Eloquent models. Protobuf messages are immutable-by-convention DTOs, while Eloquent expects mutable, mass-assignable models with events and relationships. If you need to persist or expose these messages in a Laravel domain, write an adapter or DTO mapper between the protobuf classes and your application models. Budget for that mapping work if you depend on the package directly.
What is the difference between google/cloud-common-protos and google/common-protos?
They are related but separate Composer artifacts, and the ecosystem also contains the broader set of generated classes from the Googleapis repository. google/cloud-common-protos is the package described here: generated PHP classes for protobuf types shared across multiple Google Cloud APIs, distributed as a stable, backwards-compatible dependency. Standardize on one package name in your project and document the choice so developers do not mix them accidentally.
Is google/cloud-common-protos production-ready and actively maintained?
It is a stable Apache 2.0 package whose generated classes are intended not to change in backwards-incompatible ways, and it is part of the wider Google Cloud PHP project. Its repository can look quiet, with few stars and direct dependents, because it is a leaf dependency of a monorepo rather than a standalone application. Treat release notes as potentially unreliable and verify upgrades with composer update --dry-run and a diff before deploying to production.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource