PHPackages                             shopforward/google-cloud - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. shopforward/google-cloud

ActiveLibrary[File &amp; Storage](/categories/file-storage)

shopforward/google-cloud
========================

Google Cloud Client Library

0.254.1(1y ago)046Apache-2.0PHPPHP ^8.0

Since Aug 19Pushed 1y agoCompare

[ Source](https://github.com/nkop/google-cloud-php)[ Packagist](https://packagist.org/packages/shopforward/google-cloud)[ Docs](http://github.com/googleapis/google-cloud-php)[ RSS](/packages/shopforward-google-cloud/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (19)Versions (2)Used By (0)

Google Cloud PHP Client
=======================

[](#google-cloud-php-client)

> Idiomatic PHP client for [Google Cloud Platform](https://cloud.google.com/) services.

CI Status
---------

[](#ci-status)

PHP VersionStatus[![Latest Stable Version](https://camo.githubusercontent.com/8d35cd63b206826ccb47dda8e0d346d30a7db97177d418c8dcd5be5ace9fd864/68747470733a2f2f706f7365722e707567782e6f72672f676f6f676c652f636c6f75642f762f737461626c65)](https://packagist.org/packages/google/cloud) [![Packagist](https://camo.githubusercontent.com/0ab23553c749d151d92e24126a04fab67f74c4c1ca10d4ca2c33407966557c50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f676f6f676c652f636c6f75642e737667)](https://packagist.org/packages/google/cloud)[![Kokoro CI](https://camo.githubusercontent.com/f33817678281bfdd392bc2bdba0f80557aa46bd295d316fd77fc127440309d2b/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f636c6f75642d64657672656c2d7075626c69632f7068702f6261646765732f676f6f676c652d636c6f75642d7068702f70687037342e737667)](https://storage.googleapis.com/cloud-devrel-public/php/badges/google-cloud-php/php74.html)View the [list of supported APIs and Services](https://cloud.google.com/php/docs/reference).

If you need support for other Google APIs, please check out the [Google APIs Client Library for PHP](https://github.com/google/google-api-php-client).

Quick Start
-----------

[](#quick-start)

We recommend installing individual component packages. A list of available packages can be found on [Packagist](https://packagist.org/search/?q=google%2Fcloud-).

For example:

```
$ composer require google/cloud-storage
$ composer require google/cloud-bigquery
$ composer require google/cloud-datastore
```

You can then include the autoloader and create your client:

```
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient();

$bucket = $storage->bucket('my_bucket');

// Upload a file to the bucket.
$bucket->upload(
    fopen('/data/file.txt', 'r')
);

// Download and store an object from the bucket locally.
$object = $bucket->object('file_backup.txt');
$object->downloadToFile('/data/file_backup.txt');
```

### Authentication

[](#authentication)

Authentication is handled by the client library automatically. You just need to provide the authentication details when creating a client. Generally, authentication is accomplished using a Service Account. For more information on obtaining Service Account credentials, see our [Authentication Guide](https://cloud.google.com/docs/authentication/production#manually).

Once you've obtained your credentials file, it may be used to create an authenticated client.

```
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

// Authenticate using a keyfile path
$cloud = new StorageClient([
    'keyFilePath' => 'path/to/keyfile.json'
]);

// Authenticate using keyfile data
$cloud = new StorageClient([
    'keyFile' => json_decode(file_get_contents('/path/to/keyfile.json'), true)
]);
```

If you do not wish to embed your authentication information in your application code, you may also make use of [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials).

```
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/keyfile.json');

$cloud = new StorageClient();
```

The `GOOGLE_APPLICATION_CREDENTIALS` environment variable may be set in your server configuration.

### gRPC and Protobuf

[](#grpc-and-protobuf)

Many clients in Google Cloud PHP offer support for gRPC, either as an option or a requirement. gRPC is a high-performance RPC framework created by Google. To use gRPC in PHP, you must install the gRPC PHP extension on your server. While not required, it is also recommended that you install the protobuf extension whenever using gRPC in production.

```
$ pecl install grpc
$ pecl install protobuf

```

- [gRPC Installation Instructions](https://cloud.google.com/php/grpc)
- [Protobuf Installation Instructions](https://cloud.google.com/php/grpc#installing_the_protobuf_runtime_library)

Caching Access Tokens
---------------------

[](#caching-access-tokens)

By default the library will use a simple in-memory caching implementation, however it is possible to override this behavior by passing a [PSR-6](http://www.php-fig.org/psr/psr-6/) caching implementation in to the desired client.

The following example takes advantage of [Symfony's Cache Component](https://github.com/symfony/cache).

```
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

// Please take the proper precautions when storing your access tokens in a cache no matter the implementation.
$cache = new ArrayAdapter();

$storage = new StorageClient([
    'authCache' => $cache
]);
```

This library provides a PSR-6 implementation with the SystemV shared memory at `Google\Auth\Cache\SysVCacheItemPool`. This implementation is only available on \*nix machines, but it's the one of the fastest implementations and you can share the cache among multiple processes. The following example shows how to use it.

```
require __DIR__ . '/vendor/autoload.php';

use Google\Cloud\Spanner\SpannerClient;
use Google\Auth\Cache\SysVCacheItemPool;

$cache = new SysVCacheItemPool();

$spanner = new SpannerClient([
    'authCache' => $cache
]);
```

PHP Versions Supported
----------------------

[](#php-versions-supported)

All client libraries support PHP 8.0 and above.

Versioning
----------

[](#versioning)

This library follows [Semantic Versioning](http://semver.org/).

Please note it is currently under active development. Any release versioned 0.x.y is subject to backwards incompatible changes at any time.

**GA**: Libraries defined at a GA quality level are stable, and will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority. Please note, for any components which include generated clients the GA guarantee will only apply to clients which interact with stable services. For example, in a component which hosts V1 and V1beta1 generated clients, the GA guarantee will only apply to the V1 client as the service it interacts with is considered stable.

**Beta**: Libraries defined at a Beta quality level are expected to be mostly stable and we're working towards their release candidate. We will address issues and requests with a higher priority.

Contributing
------------

[](#contributing)

Contributions to this library are always welcome and highly encouraged.

See [CONTRIBUTING](CONTRIBUTING.md) for more information on how to get started.

This repository is not an official support channel. If you have support questions, file a support request through the normal Google support channels, or post questions on a forum such as [StackOverflow](http://stackoverflow.com/questions/tagged/google-cloud-platform+php).

License
-------

[](#license)

Apache 2.0 - See [LICENSE](LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

638d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89648759c303504e066317bbc5a0c2d50c7c115675a8cc344eab6c46e7722265?d=identicon)[paulcelie](/maintainers/paulcelie)

---

Top Contributors

[![yoshi-automation](https://avatars.githubusercontent.com/u/44816363?v=4)](https://github.com/yoshi-automation "yoshi-automation (1317 commits)")[![gcf-owl-bot[bot]](https://avatars.githubusercontent.com/in/99011?v=4)](https://github.com/gcf-owl-bot[bot] "gcf-owl-bot[bot] (1269 commits)")[![jdpedrie](https://avatars.githubusercontent.com/u/89034?v=4)](https://github.com/jdpedrie "jdpedrie (520 commits)")[![dwsupplee](https://avatars.githubusercontent.com/u/2079879?v=4)](https://github.com/dwsupplee "dwsupplee (516 commits)")[![bshaffer](https://avatars.githubusercontent.com/u/103941?v=4)](https://github.com/bshaffer "bshaffer (342 commits)")[![release-please[bot]](https://avatars.githubusercontent.com/in/40688?v=4)](https://github.com/release-please[bot] "release-please[bot] (116 commits)")[![vishwarajanand](https://avatars.githubusercontent.com/u/7369612?v=4)](https://github.com/vishwarajanand "vishwarajanand (108 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (107 commits)")[![michaelbausor](https://avatars.githubusercontent.com/u/14846209?v=4)](https://github.com/michaelbausor "michaelbausor (82 commits)")[![saranshdhingra](https://avatars.githubusercontent.com/u/1038319?v=4)](https://github.com/saranshdhingra "saranshdhingra (56 commits)")[![dpebot](https://avatars.githubusercontent.com/u/19979279?v=4)](https://github.com/dpebot "dpebot (49 commits)")[![yash30201](https://avatars.githubusercontent.com/u/54198301?v=4)](https://github.com/yash30201 "yash30201 (45 commits)")[![chingor13](https://avatars.githubusercontent.com/u/32483?v=4)](https://github.com/chingor13 "chingor13 (44 commits)")[![ajupazhamayil](https://avatars.githubusercontent.com/u/14087896?v=4)](https://github.com/ajupazhamayil "ajupazhamayil (43 commits)")[![ava12](https://avatars.githubusercontent.com/u/1997053?v=4)](https://github.com/ava12 "ava12 (27 commits)")[![larkee](https://avatars.githubusercontent.com/u/31196561?v=4)](https://github.com/larkee "larkee (18 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (13 commits)")[![danielgsims](https://avatars.githubusercontent.com/u/695933?v=4)](https://github.com/danielgsims "danielgsims (10 commits)")[![jeromegamez](https://avatars.githubusercontent.com/u/67554?v=4)](https://github.com/jeromegamez "jeromegamez (8 commits)")[![AVaksman](https://avatars.githubusercontent.com/u/7764119?v=4)](https://github.com/AVaksman "AVaksman (7 commits)")

---

Tags

languagetranslatecloudgoogletranslationstoragegcsgoogle apiTasksvisionpub-subnatural-languagepubsubdatastorespeechgoogle cloudbigquerykmsgoogle apis clientgoogle api clientgoogle apisgoogle cloud platformbig querystackdriver loggingspannerbigtable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shopforward-google-cloud/health.svg)

```
[![Health](https://phpackages.com/badges/shopforward-google-cloud/health.svg)](https://phpackages.com/packages/shopforward-google-cloud)
```

###  Alternatives

[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k511.3M2.2k](/packages/aws-aws-sdk-php)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
