Skip to content
PHP clients for Riak
Latest commit 4bb24da May 16, 2016 @christophermancini christophermancini Added
Added file to be able to track release history.
Failed to load latest commit information.
examples missed committing this change to the example file. May 5, 2016
src Merge pull request #120 from basho/ts May 16, 2016
tests Merge pull request #120 from basho/ts May 16, 2016
.gitignore ignoring composer.phar file Apr 2, 2015
.travis.yml remove the flag to allow failures for PHP 7 since it has been officia… Dec 28, 2015 improve documentation of dependencies for the lib Nov 8, 2015
LICENSE Added short license header for Apache 2.0 license to all class files.… Oct 13, 2014 Fixed error in example code Feb 5, 2016 Added May 16, 2016
apigen.neon add baseUrl to api docs config Dec 30, 2015
composer.json ugh... PHPUnit 5.1 requires PHP 5.6+. Jan 12, 2016
phpunit.xml remove TS testsuite as it causes it to run automatically. fix ts unit… May 5, 2016

Riak Client for PHP

Riak PHP Client is a library which makes it easy to communicate with Riak, an open source, distributed database that focuses on high availability, horizontal scalability, and predictable latency. This library communicates with Riak's HTTP interface using the cURL extension. If you want to communicate with Riak using the Protocol Buffers interface, use the Official PHP PB Client. Both Riak and this library are maintained by Basho Technologies.

To see other clients available for use with Riak visit our Documentation Site

  1. Installation
  2. Documentation
  3. Contributing
  4. Roadmap
  5. License and Authors



Composer Install

This library has been added to Packagist to simplify the installation process. Run the following composer command:

$ composer require "basho/riak": "3.0.*"

Alternately, manually add the following to your composer.json, in the require section:

"require": {
    "basho/riak": "3.0.*"

And then run composer update to ensure the module is installed.


  • Master: Build Status

A fully traversable version of the API documentation for this library can be found on Github Pages.


The release tags of this project have been aligned with the major & minor release versions of Riak. For example, if you are using version 1.4.9 of Riak, then you will want the latest 1.4.* version of this library.

Example Usage

Below is a short example of using the client. More substantial sample code is available in examples.

// lib classes are included via the Composer autoloader files
use Basho\Riak;
use Basho\Riak\Node;
use Basho\Riak\Command;

// define the connection info to our Riak nodes
$nodes = (new Node\Builder)
    ->buildCluster(['', '', '',]);

// instantiate the Riak client
$riak = new Riak($nodes);

// build a command to be executed against Riak
$command = (new Command\Builder\StoreObject($riak))

// Receive a response object
$response = $command->execute();

// Retrieve the Location of our newly stored object from the Response object
$object_location = $response->getLocation();


This repo's maintainers are engineers at Basho and we welcome your contribution to the project! You can start by reviewing for information on everything from testing to coding standards.

An honest disclaimer

Due to our obsession with stability and our rich ecosystem of users, community updates on this repo may take a little longer to review.

The most helpful way to contribute is by reporting your experience through issues. Issues may not be updated while we review internally, but they're still incredibly appreciated.

Thank you for being part of the community! We love you for it.


  • Current develop & master branches contain feature support for Riak version 2.1+
  • Add support for Riak TS Q2 2016

License and Authors

Copyright (c) 2015 Basho Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"). For more details, see License.

Something went wrong with that request. Please try again.