Download the PHP package runtime/google-cloud without Composer

On this page you can find all versions of the php package runtime/google-cloud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package google-cloud

Google Cloud Runtime

A runtime for Google Cloud.

If you are new to the Symfony Runtime component, see the "The Long Story" down below.

Installation

This runtime layer is special. It includes a router.php to enable the use of Symfony Runtime component. You need to install this package and the runtime you want to use.

To use with native or Symfony application.

If you want to use it with PSR-7.

Usage

Define the environment variable FUNCTION_SOURCE.

Note that Google Cloud requires you to have an index.php file. If you are running Symfony you probably want to define FUNCTION_SOURCE=public/index.php but you still need to create an index.php.

Using CloudEvent

Troubleshooting

Cache/Build Directory

Note that Google Cloud will only deploy files that are not in .gitignore. You need to remove the var/ entry before deployment to be able to warm up the cache etc.

Define Symfony Environment

Define environment variable APP_ENV=prod to use Symfony production mode.

The Long Story

This section is for you who are new to Symfony Runtime component.

Symfony Runtime component will be released with Symfony 5.3 in May 2021. Here is the official documentation there is also a compressed version in the main readme.

Every Symfony application from Symfony 5.3 will be created with this component as default. The component makes sure your application is decoupled from the global state. Which means your application is very portable. With some config (or automatic mapping) a RuntimeInterface is used as the "glue" between Nginx and your application.

Of course, different RuntimeInterface "glue" between different things. One Runtime is for Google Cloud, one for Bref/AWS, one for Swoole, one for RoadRunner etc. The point is that your application does not care what runtime it is. This means that you can run your application locally with a normal web server (like Nginx) and deploy it to Google Cloud with zero changes and still be sure everything works.

Google Cloud Runtime Specifically

Since Google Cloud is very similar to a "normal web server", this runtime only contains 2 things:

  1. router.php which is a requirement from Google Cloud. Its job is just to redirect the request to the front controller. It is not used locally.
  2. Support for CloudEvent. If you write an application that expects a Google\CloudFunctions\CloudEvent this runtime will automatically detect that and create such object for you.

It will support native PHP applications and Symfony HttpFoundation type applications out-of-the-box. To support PSR-7/PSR-15 or Laravel, one also need to install one additional runtime. See main readme for more information.


All versions of google-cloud with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
ext-json Version *
symfony/runtime Version ^5.3 || ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package runtime/google-cloud contains the following files

Loading the files please wait ....