Skip to content
No description, website, or topics provided.
PHP Python
Branch: master
Clone or download
yoshi-automation and busunkim96 chore: release 0.117.0 (#2432)
* updated Spanner/VERSION [ci skip]

* updated Spanner/src/SpannerClient.php [ci skip]

* updated Storage/VERSION [ci skip]

* updated Storage/src/StorageClient.php [ci skip]

* updated Talent/VERSION [ci skip]

* updated Tasks/VERSION [ci skip]

* updated composer.json [ci skip]

* updated docs/manifest.json [ci skip]

* updated [ci skip]

* updated src/Version.php [ci skip]

* updated src/ServiceBuilder.php [ci skip]
Latest commit 81b89d8 Nov 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src feat: add HttpRequest/OAuthToken/OidcToken support (#2445) Nov 11, 2019
.gitattributes Add Tasks client lib (#1133) Jun 28, 2018
LICENSE Add Tasks client lib (#1133) Jun 28, 2018 Move Tasks V2 to GA (#1861) May 2, 2019
phpunit-system.xml.dist Correct system test configs (#1313) Sep 20, 2018
phpunit.xml.dist Prepare v0.70.0 (#1153) Jul 3, 2018

Google Cloud Tasks for PHP

Idiomatic PHP client for Google Cloud Tasks.

Latest Stable Version Packagist

NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.


To begin, install the preferred dependency manager for PHP, Composer.

Now to install just this component:

$ composer require google/cloud-tasks

Or to install the entire suite of components at once:

$ composer require google/cloud

This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits offered by gRPC (such as streaming methods) please see our gRPC installation guide.


Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.


require_once __DIR__ . '/vendor/autoload.php';

use Google\Cloud\Tasks\V2\CloudTasksClient;
use Google\Cloud\Tasks\V2\Queue;

$client = new CloudTasksClient();

$project = 'example-project';
$location = 'us-central1';
$queue = uniqid('example-queue-');
$queueName = $client::queueName($project, $location, $queue);

// Create a queue
$locationName = $client::locationName($project, $location);
$queue = new Queue([
    'name' => $queueName
$client->createQueue($locationName, $queue);

echo "$queueName created." . PHP_EOL;

// List queues
echo 'Listing the queues' . PHP_EOL;
$resp = $client->listQueues($locationName);
foreach ($resp->iterateAllElements() as $q) {
    echo $q->getName() . PHP_EOL;

// Delete the queue


This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

Removal of pull queue

The past version (V2beta2) supported pull queues, but we removed the pull queue support from V2/V2beta3. For more details, read our documentation about the removal.

You can’t perform that action at this time.