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
Google Api Bundle

Google Api Bundle Laravel Package

happyr/google-api-bundle

Symfony bundle that integrates the official Google APIs PHP client. It configures and exposes a ready-to-use Google_Client service, with bundle settings for application credentials, OAuth, and API access, simplifying Google service integration in Symfony applications.

View on GitHub
Deep Wiki
Context7

A Symfony Wrapper for the Google APIs Client Library for PHP

Frequently asked questions about Google Api Bundle
Can I use happyr/google-api-bundle in a Laravel application?
No. happyr/google-api-bundle is a Symfony bundle that registers a Bundle class and a dependency-injection extension, and Laravel has no bundle registration mechanism. You cannot install it and wire it up the way its author intended. The useful part, a configured Google_Client, is roughly 40 lines of a Laravel service provider, so bypassing the package is simpler and safer.
How do I install happyr/google-api-bundle?
You would install it with Composer and then register the bundle in a Symfony kernel, which is not something Laravel supports. Its service definitions depend on Symfony Config and DependencyInjection components, so manually instantiating them outside the Symfony container is fragile. For Laravel, install google/apiclient instead and configure it in a service provider.
Is happyr/google-api-bundle still maintained?
No. The last release was September 2018, roughly seven years ago, and it targets the Symfony 2, 3, and 4 era with PHP 7.x constraints. It has zero dependents, so there is no downstream pressure to fix breakage and no community patch path. Unmaintained wrappers around OAuth and credential code are also a security concern.
What is the best Laravel alternative to happyr/google-api-bundle?
Use google/apiclient v2.x directly and wrap it yourself. Bind a singleton Google\Client in a service provider, read credentials from config and environment variables, and add thin typed clients per Google service so feature code never touches raw Google_Service classes. That gives you modern PHP and Guzzle 7 support plus an actively maintained auth flow.
How do I configure Google API credentials and scopes in Laravel?
Put the client ID, client secret, scopes, service account JSON path, and developer key in config/google.php, sourced from environment variables so secrets are never committed. Resolve them through Laravel's config cache, then build the Google\Client singleton from that array in a service provider. The bundle's own configuration array maps one-to-one, which makes porting mechanical.
Does happyr/google-api-bundle support Laravel 11, PHP 8.2, and Guzzle 7?
Almost certainly not. The bundle pins Symfony 2/3/4-era dependencies and PHP 7.x constraints, and its transitive Guzzle and PSR constraints will likely conflict with modern Laravel, which expects guzzlehttp/guzzle ^7 and current psr packages. Expect Composer resolution failure or forced downgrades. Verify the PHP floor, Guzzle major version, and psr constraints before committing to anything.
How do I register a Google_Client singleton in a Laravel service provider?
In a service provider's register method, bind Google\Client as a singleton and build it from config, then call setAuthConfig, add scopes, and set the access token or subject as needed. Resolve it through the container wherever you need it. Keep Google_Service construction in small typed client classes rather than injecting the raw client everywhere.
How do I handle OAuth token storage and refresh in Laravel?
The Google API PHP client does not manage token storage for you, so persist access and refresh tokens in the database or cache keyed to your user or tenant. Refresh explicitly when the token is expired, and handle revoked or invalid grants by sending the user through the consent flow again. For server-to-server work, use service accounts or domain-wide delegation instead of interactive OAuth.
How do I test a Google API integration in Laravel without hitting real APIs?
Mock at the boundary rather than calling Google. Bind a fake or mock Google\Client in the container, or inject a fake HTTP client into the SDK so requests are recorded and stubbed. Assert on the outgoing request payloads and on your own typed client behavior, and keep a small number of optional integration tests for the real auth flow.
How do I migrate from the Symfony GoogleApiBundle to a Laravel integration?
Extract the bundle's configuration array, including client ID, secret, scopes, service account JSON path, and developer key, and remap it one-to-one into config/google.php. The bundle's only real behavior is building a Google_Client from that config, so the mapping is mechanical. Code that type-hints Google_Client or Google_Service classes transfers unchanged, which keeps the port low risk.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource