diff --git a/composer.json b/composer.json index ae6f450b6..3f5e34175 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^5.6|^7.0", + "php": ">=5.6", "psr/log": "~1.0", "guzzlehttp/ringphp" : "~1.0" }, diff --git a/src/Elasticsearch/Client.php b/src/Elasticsearch/Client.php index e22c3a125..badec43e9 100644 --- a/src/Elasticsearch/Client.php +++ b/src/Elasticsearch/Client.php @@ -32,7 +32,7 @@ */ class Client { - const VERSION = '5.5.0'; + const VERSION = '5.5.1'; /** * @var Transport diff --git a/src/Elasticsearch/Connections/Connection.php b/src/Elasticsearch/Connections/Connection.php index adb9d7ab0..656822858 100644 --- a/src/Elasticsearch/Connections/Connection.php +++ b/src/Elasticsearch/Connections/Connection.php @@ -326,7 +326,7 @@ private function wrapHandler(callable $handler, LoggerInterface $logger, LoggerI private function getURI($uri, $params) { if (isset($params) === true && !empty($params)) { - array_walk($params, function (&$value, &$key) { + array_walk($params, function (&$value) { if ($value === true) { $value = 'true'; } else if ($value === false) { diff --git a/src/Elasticsearch/Connections/ConnectionInterface.php b/src/Elasticsearch/Connections/ConnectionInterface.php index 44495dbdc..d6b96d3e8 100644 --- a/src/Elasticsearch/Connections/ConnectionInterface.php +++ b/src/Elasticsearch/Connections/ConnectionInterface.php @@ -95,5 +95,5 @@ public function getLastRequestInfo(); * @param \Elasticsearch\Transport $transport * @return mixed */ - public function performRequest($method, $uri, $params = null, $body = null, $options = [], Transport $transport); + public function performRequest($method, $uri, $params = null, $body = null, $options = [], Transport $transport = null); } diff --git a/src/Elasticsearch/Transport.php b/src/Elasticsearch/Transport.php index 2354a80f4..5ca3fad6c 100644 --- a/src/Elasticsearch/Transport.php +++ b/src/Elasticsearch/Transport.php @@ -48,7 +48,7 @@ class Transport * @param ConnectionPool\AbstractConnectionPool $connectionPool * @param \Psr\Log\LoggerInterface $log Monolog logger object */ - public function __construct($retries, $sniffOnStart = false, AbstractConnectionPool $connectionPool, LoggerInterface $log) + public function __construct($retries, $sniffOnStart = false, AbstractConnectionPool $connectionPool = null, LoggerInterface $log = null) { $this->log = $log; $this->connectionPool = $connectionPool;