2017 © Pedro Peláez
 

library php-driver

DataStax PHP Driver for Apache Cassandra

image

datastax/php-driver

DataStax PHP Driver for Apache Cassandra

  • Tuesday, June 26, 2018
  • by avalanche123
  • Repository
  • 83 Watchers
  • 327 Stars
  • 106,634 Installations
  • C
  • 14 Dependents
  • 0 Suggesters
  • 97 Forks
  • 1 Open issues
  • 33 Versions
  • 9 % Grown

The README.md

:warning: The PHP driver is in maintenance mode. We are still accepting pull-requests and we will occasionally release critical bug fixes, but no ongoing active development is being done currently., (*1)

DataStax PHP Driver for Apache Cassandra

Build Status: Linux Build Status: Windows, (*2)

A modern, feature-rich and highly tunable PHP client library for Apache Cassandra 2.1+ using exclusively Cassandra's binary protocol and Cassandra Query Language v3. Use the DSE PHP driver for better compatibility and support for DataStax Enterprise., (*3)

This is a wrapper around the DataStax C/C++ Driver for Apache Cassandra., (*4)

Note: DataStax products do not support big-endian systems., (*5)

Getting the Driver

Binary versions of the driver, available for multiple operating systems and multiple versions of PHP, can be obtained from DataStax download server. The source code is made available via GitHub. If you're using DataStax Enterprise use the DSE PHP driver instead., (*6)

Note: The driver extension is a wrapper around the DataStax C/C++ Driver for Apache Cassandra and is a requirement for proper installation of the PHP extension binaries. Ensure these dependencies are met before proceeding., (*7)

What's new in v1.2.0/v1.3.0

Compatibility

This driver works exclusively with the Cassandra Query Language v3 (CQL3) and Cassandra's native protocol. The current version works with:, (*8)

  • Apache Cassandra versions 2.1, 2.2 and 3.0+
  • PHP 5.6, PHP 7.0, and PHP 7.1
    • 32-bit (x86) and 64-bit (x64)
    • Thread safe (TS) and non-thread safe (NTS)
  • Compilers: GCC 4.1.2+, Clang 3.4+, and MSVC 2010/2012/2013/2015

If using DataStax Enterprise the DSE PHP driver provides more features and better compatibility., (*9)

Documentation

Getting Help

  • JIRA: https://datastax-oss.atlassian.net/browse/PHP
  • Mailing List: https://groups.google.com/a/lists.datastax.com/forum/#!forum/php-driver-user
  • DataStax Academy via Slack: https://academy.datastax.com/slack

Quick Start

<?php
$cluster   = Cassandra::cluster()                 // connects to localhost by default
                 ->build();
$keyspace  = 'system';
$session   = $cluster->connect($keyspace);        // create session, optionally scoped to a keyspace
$statement = new Cassandra\SimpleStatement(       // also supports prepared and batch statements
    'SELECT keyspace_name, columnfamily_name FROM schema_columnfamilies'
);
$future    = $session->executeAsync($statement);  // fully asynchronous and easy parallel execution
$result    = $future->get();                      // wait for the result, with an optional timeout

foreach ($result as $row) {                       // results and rows implement Iterator, Countable and ArrayAccess
    printf("The keyspace %s has a table called %s\n", $row['keyspace_name'], $row['columnfamily_name']);
}

Installation

pecl install cassandra

Read detailed instructions on building and installing the extension, (*10)

Contributing

Read our contribution policy for a detailed description of the process., (*11)

Code examples

The DataStax PHP Driver uses the amazing Behat Framework for both end-to-end, or acceptance testing and documentation. All of the features supported by the driver have appropriate acceptance tests with easy-to-copy code examples in the features/ directory., (*12)

Running tests

For your convenience a Vagrantfile with configuration ready for testing is available. To execute tests, run the following:, (*13)

git clone https://github.com/datastax/php-driver.git
cd php-driver
git submodule update --init
vagrant up
vagrant ssh

Once you've logged in to the vagrant VM, run:, (*14)

cd /usr/local/src/php-driver
./bin/behat
./bin/phpunit

© DataStax, Inc., (*15)

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at, (*16)

http://www.apache.org/licenses/LICENSE-2.0, (*17)

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License., (*18)

The Versions

26/06 2018

dev-master

9999999-dev http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0
  • ext-cassandra ^1.0.0

 

The Development Requires

database nosql driver cassandra datastax

13/10 2017

dev-PHP-207

dev-PHP-207 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0
  • ext-cassandra ^1.0.0

 

The Development Requires

database nosql driver cassandra datastax

11/08 2017

v1.3.2

1.3.2.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0
  • ext-cassandra ^1.0.0

 

The Development Requires

database nosql driver cassandra datastax

07/08 2017

dev-PHP-198

dev-PHP-198 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0
  • ext-cassandra ^1.0.0

 

The Development Requires

database nosql driver cassandra datastax

03/08 2017

dev-PHP-159

dev-PHP-159 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0
  • ext-cassandra ^1.0.0

 

The Development Requires

database nosql driver cassandra datastax

03/08 2017

dev-PHP-117

dev-PHP-117 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

18/05 2017

dev-PHP-189

dev-PHP-189 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

16/05 2017

v1.3.1

1.3.1.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

13/03 2017

v1.3.0

1.3.0.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

02/03 2017

dev-1.3.0-release

dev-1.3.0-release http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

24/02 2017

dev-PHP-145

dev-PHP-145 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

23/02 2017

dev-PHP-152

dev-PHP-152 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

13/02 2017

dev-php-138_no_copy

dev-php-138_no_copy http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

10/02 2017

dev-remove_pedantic

dev-remove_pedantic http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

10/02 2017

dev-packaging

dev-packaging http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

09/02 2017

dev-PHP-144-warning

dev-PHP-144-warning http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

09/02 2017

dev-test/PHP-143

dev-test/PHP-143 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

08/02 2017

dev-PHP-144

dev-PHP-144 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

08/02 2017

dev-PHP-139

dev-PHP-139 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

06/02 2017

dev-PHP-143

dev-PHP-143 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

06/02 2017

dev-PHP-114

dev-PHP-114 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

06/02 2017

dev-PHP-119

dev-PHP-119 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

14/12 2016

dev-core

dev-core http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

08/12 2016

dev-dse

dev-dse http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

08/08 2016

v1.2.2

1.2.2.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

28/07 2016

v1.2.1

1.2.1.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

18/07 2016

v1.2.0

1.2.0.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

11/02 2016

v1.1.0

1.1.0.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

20/11 2015

1.0.1

1.0.1.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

14/09 2015

v1.0.0

1.0.0.0 http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

29/07 2015

v1.0.0-rc

1.0.0.0-RC http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

27/05 2015

v1.0.0-beta

1.0.0.0-beta http://datastax.github.io/php-driver/

DataStax PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Development Requires

database nosql driver cassandra datastax

02/04 2015

v1.0.0-alpha

1.0.0.0-alpha http://datastax.github.io/php-driver/

PHP Driver for Apache Cassandra

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2
  • ext-cassandra *

 

The Development Requires

database nosql driver cassandra datastax