Download the PHP package google/cloud without Composer
On this page you can find all versions of the php package google/cloud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package cloud
Short Description Google Cloud Client Library
License Apache-2.0
Homepage http://github.com/googleapis/google-cloud-php
Rated 5.00 based on 1 reviews
Informations about the package cloud
Google Cloud PHP Client
Idiomatic PHP client for Google Cloud Platform services.
CI Status
PHP Version | Status |
---|---|
View the list of supported APIs and Services.
If you need support for other Google APIs, please check out the Google APIs Client Library for PHP.
We recommend installing individual component packages. A list of available packages can be found on Packagist.
For example:
Quickstart
In this guide we'll focus on how to configure your client for local development using the Google
Cloud CLI (gcloud
).
For local development:
- Install the Google Cloud CLI.
- Authenticate with
gcloud
to generate the credentials file. - Instantiate a client.
Installing the Google Cloud CLI
In order to generate our needed credentials file we need to authenticate to gcloud first. Installation is handled differently depending on your platform. Here is a link to help you setup the Google Cloud CLI:
https://cloud.google.com/sdk/docs/install
Authenticate via the gcloud
command
Once the Google Cloud CLI tools are installed it is required that we authenticate via the gcloud
:
This will create a local file in your system that the authentication library for our client will read in order to make requests to the apis with those credentials. This file is located in different place depending on your system.
Windows:
Linux and MacOS:
To read more about Authentication, see AUTHENTICATION.md
Installing a client
Install the Google Translate client library with composer
Note: For this example, we are using the Google Translate client library. Check the the complete list of packages to find your required library.
Instantiating the client
Now that we've authenticated and installed the client library, we can instantiate a client which will detect the JSON file created by the gcloud CLI and use it to authenticate your requests:
Authentication
Note
This quickstart is built with local development in mind. The steps for deploying your project are different depending on the environment you use. Here we provide some basic instruction in how to get started with deployment of your project:
- For applications running elsewhere, authentication is usually accomplished using a Service Account.
For more information on obtaining Service Account credentials see our
Authentication Guide. Set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable pointing to your credentials file.
Note:
Some clients accept the keyFilePath
and keyFile
configuration options pointing to the credentials file:
A list of clients that accept these parameters are:
We recommend to visit the Check the client documentation for the client library you're using for more in depth information.
If you do not wish to embed your authentication information in your application code, you may also make use of Application Default Credentials.
The GOOGLE_APPLICATION_CREDENTIALS
environment variable may be set in your server configuration.
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.
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 caching implementation in to the desired client.
The following example takes advantage of Symfony's Cache Component.
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.
PHP Versions Supported
All client libraries support PHP 8.0 and above.
Versioning
This library follows Semantic Versioning.
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
Contributions to this library are always welcome and highly encouraged.
See CONTRIBUTING 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.
License
Apache 2.0 - See LICENSE for more information.
All versions of cloud with dependencies
rize/uri-template Version ~0.3
guzzlehttp/guzzle Version ^7.4.5
guzzlehttp/psr7 Version ^2.6
monolog/monolog Version ^2.9||^3.0
psr/http-message Version ^1.0|^2.0
ramsey/uuid Version ^4.0
google/gax Version ^1.36.0
google/auth Version ^1.42