Download the PHP package php-riak/riak-client without Composer
On this page you can find all versions of the php package php-riak/riak-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package riak-client
Riak Client for PHP
A PHP client for Riak.
Installation
Run the following composer
command:
Documentation
API documentation for this library can be found on readthedocs
Overview
Getting started with the php riak client.
The easiest way to get started with the client is using a RiakClientBuilder
:
Once you have a $client, commands from the Riak\Client\Command*
namespace are built then executed by the client.
Some basic examples of building and executing these commands is shown below.
Getting Data In
Getting Data Out
Removing Data
Merging siblings
Siblings are an important feature in Riak,
for this purpose we have the interface Riak\Client\Resolver\ConflictResolver
,
you implement this interface to resolve siblings into a single object.
Below is a simple example that will just merge the content of siblings :
Performance
This library is faster than most riak clients written in php, It is about 50% percent faster is some cases, mostly because it uses protocol buffer and and iterators every where it is possible.
For more details and riak clients performance comparison see : https://github.com/FabioBatSilva/riak-clients-performance-comparison
Unit & Integration Tests
We want to ensure that all code that is included in a release has proper coverage with unit tests. It is expected that all pull requests that include new classes or class methods have appropriate unit tests included with the PR.
Running Tests
Before running the functional tests set up your riak cluster:
-
Create and activate the following types :
- Enable search capabilities in your
riak.conf
:
We also expect that before submitting a pull request, that you have run the tests to ensure that all of them continue to pass after your changes.
To run the tests, clone this repository and run composer update
from the repository root, then you can execute all the tests by simply running
php vendor/bin/phpunit
.
- To execute tests, run
./vendor/bin/phpunit
- To check code standards, run
./vendor/bin/phpcs -p --extensions=php --standard=ruleset.xml src
All versions of riak-client with dependencies
php-riak/riak-client-pb Version ~1
doctrine/annotations Version ~1
guzzlehttp/guzzle Version ^5.3.1