Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #30 from M6Web/fix/compatible-driver-1.3.0
Browse files Browse the repository at this point in the history
Fix errors with driver 1.3.0
  • Loading branch information
gmillet authored Apr 6, 2017
2 parents 9492fa8 + f5b70bd commit 2cdffac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- 7.1

env:
- SYMFONY_VERSION="~2.3.0"
- SYMFONY_VERSION="~2.7.0"
- SYMFONY_VERSION="~3.0.0"
- SYMFONY_VERSION="~3.2.0"

branches:
only:
Expand All @@ -20,8 +20,9 @@ before_install:
# PPA for libuv-dev
- sudo apt-add-repository ppa:linuxjedi/ppa -y
- sudo apt-get update
- sudo apt-get install -y libuv-dev libssl-dev
- cd /tmp && git clone https://github.com/datastax/php-driver.git && cd php-driver && git checkout v1.2.2 && git submodule update --init
- sudo apt-get install -y libssl-dev
- cd /tmp && wget https://github.com/libuv/libuv/archive/v1.11.0.tar.gz && tar -xvzf v1.11.0.tar.gz && cd libuv-1.11.0 && sh autogen.sh && ./configure && sudo make && sudo make install && sudo ldconfig
- cd /tmp && git clone https://github.com/datastax/php-driver.git && cd php-driver && git checkout master && git submodule update --init
- cd ext && ./install.sh && cd "$TRAVIS_BUILD_DIR"
- echo "extension=cassandra.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
}
],
"require": {
"php": ">=5.5",
"ext-cassandra": "<1.3.0"
"php": ">=5.6",
"ext-cassandra": "^1.3.0"
},
"require-dev": {
"atoum/atoum": "^2.8||^3.0",
Expand Down
16 changes: 12 additions & 4 deletions src/Cassandra/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getSession()
*
* @return \Cassandra\Rows execution result
*/
public function execute(Statement $statement, ExecutionOptions $options = null)
public function execute($statement, $options = null)
{
return $this->send('execute', [$statement, $options]);
}
Expand All @@ -152,7 +152,7 @@ public function execute(Statement $statement, ExecutionOptions $options = null)
*
* @return \Cassandra\Future future result
*/
public function executeAsync(Statement $statement, ExecutionOptions $options = null)
public function executeAsync($statement, $options = null)
{
return $this->send('executeAsync', [$statement, $options]);
}
Expand All @@ -170,7 +170,7 @@ public function executeAsync(Statement $statement, ExecutionOptions $options = n
*
* @return PreparedStatement prepared statement
*/
public function prepare($cql, ExecutionOptions $options = null)
public function prepare($cql, $options = null)
{
return $this->send('prepare', [$cql, $options]);
}
Expand All @@ -185,7 +185,7 @@ public function prepare($cql, ExecutionOptions $options = null)
*
* @return \Cassandra\Future statement
*/
public function prepareAsync($cql, ExecutionOptions $options = null)
public function prepareAsync($cql, $options = null)
{
return $this->send('prepareAsync', [$cql, $options]);
}
Expand Down Expand Up @@ -321,4 +321,12 @@ protected function send($command, array $arguments)

return $this->prepareResponse($return, $event);
}

/**
* @return array Performance/Diagnostic metrics.
*/
public function metrics()
{
return $this->getSession()->metrics();
}
}

0 comments on commit 2cdffac

Please sign in to comment.