diff --git a/.gitignore b/.gitignore
index 9648de3ea..829bcff50 100755
--- a/.gitignore
+++ b/.gitignore
@@ -21,7 +21,7 @@ Thumbs.db
generator/*
# Elasticsearch related
-util/elasticsearch/
+util/elasticsearch
util/cache/
util/output
diff --git a/.travis.yml b/.travis.yml
index a445add6e..7fb8b29fc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,7 @@
language: php
-jdk:
- - oraclejdk8
-
-addons:
- apt:
- packages:
- - oracle-java8-installer
+services:
+ - docker
branches:
except:
@@ -43,11 +38,9 @@ matrix:
env:
global:
- ES_TEST_HOST=http://localhost:9200
- - JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre"
before_install:
- - sudo update-java-alternatives -s java-8-oracle
- - ./travis/download_and_run_es.sh
+ - ./travis/run_es_docker.sh
install:
- composer install --prefer-dist
@@ -65,3 +58,6 @@ script:
after_script:
- if [ $TRAVIS_PHP_VERSION = '7.3' ]; then php vendor/bin/coveralls; fi
+
+notifications:
+ email: true
diff --git a/composer.json b/composer.json
index f1a2267b1..65bfd1e10 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
"cpliakas/git-wrapper": "~1.0",
"doctrine/inflector": "^1.1",
"mockery/mockery": "^1.2",
- "phpstan/phpstan-shim": "0.9.1",
+ "phpstan/phpstan-shim": "^0.9",
"phpunit/phpunit": "6.3.0",
"squizlabs/php_codesniffer": "3.0.2",
"symfony/finder": "^2.8",
@@ -52,8 +52,7 @@
"phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests"
],
"phpstan": [
- "@php vendor/phpstan/phpstan-shim/phpstan.phar analyse -c phpstan-src.neon src --level 2 --no-progress",
- "@php vendor/phpstan/phpstan-shim/phpstan.phar analyse -c phpstan-tests.neon tests --level 7 --no-progress"
+ "@php vendor/phpstan/phpstan-shim/phpstan.phar analyse -c phpstan-src.neon src --level 2 --no-progress"
]
}
}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 2aa6c0c30..ec9364d0c 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -9,7 +9,7 @@
beStrictAboutOutputDuringTests="true"
>
-
+
diff --git a/src/Elasticsearch/Client.php b/src/Elasticsearch/Client.php
index 7368b942d..e2277483c 100644
--- a/src/Elasticsearch/Client.php
+++ b/src/Elasticsearch/Client.php
@@ -118,7 +118,7 @@ public function __construct(Transport $transport, callable $endpoint, array $reg
*/
public function info($params = [])
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Info $endpoint */
@@ -135,7 +135,7 @@ public function info($params = [])
*/
public function ping($params = [])
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Ping $endpoint */
@@ -180,7 +180,7 @@ public function get($params)
$index = $this->extractArgument($params, 'index');
$type = $this->extractArgument($params, 'type');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Get $endpoint */
@@ -214,7 +214,7 @@ public function getSource($params)
$index = $this->extractArgument($params, 'index');
$type = $this->extractArgument($params, 'type');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Get $endpoint */
@@ -254,7 +254,7 @@ public function delete($params)
$this->verifyNotNullOrEmpty("type", $type);
$this->verifyNotNullOrEmpty("index", $index);
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Delete $endpoint */
@@ -314,7 +314,7 @@ public function deleteByQuery($params = array())
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\DeleteByQuery $endpoint */
@@ -349,7 +349,7 @@ public function count($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Count $endpoint */
@@ -390,7 +390,7 @@ public function countPercolate($params = array())
$id = $this->extractArgument($params, 'id');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\CountPercolate $endpoint */
@@ -423,7 +423,7 @@ public function percolate($params)
$id = $this->extractArgument($params, 'id');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Percolate $endpoint */
@@ -456,7 +456,7 @@ public function mpercolate($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\MPercolate $endpoint */
@@ -494,7 +494,7 @@ public function termvectors($params = array())
$id = $this->extractArgument($params, 'id');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\TermVectors $endpoint */
@@ -533,7 +533,7 @@ public function mtermvectors($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\MTermVectors $endpoint */
@@ -569,7 +569,7 @@ public function exists($params)
//manually make this verbose so we can check status code
$params['client']['verbose'] = true;
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Exists $endpoint */
@@ -606,7 +606,7 @@ public function mget($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Mget $endpoint */
@@ -635,7 +635,7 @@ public function msearch($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Msearch $endpoint */
@@ -665,7 +665,7 @@ public function msearchTemplate($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\MsearchTemplate $endpoint */
@@ -705,7 +705,7 @@ public function create($params)
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Create $endpoint */
@@ -738,7 +738,7 @@ public function bulk($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Bulk $endpoint */
@@ -779,7 +779,7 @@ public function index($params)
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Index $endpoint */
@@ -809,7 +809,7 @@ public function reindex($params)
{
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Reindex $endpoint */
$endpoint = $endpointBuilder('Reindex');
@@ -836,7 +836,7 @@ public function suggest($params = array())
$index = $this->extractArgument($params, 'index');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Suggest $endpoint */
@@ -880,7 +880,7 @@ public function explain($params)
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Explain $endpoint */
@@ -941,7 +941,7 @@ public function search($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Search $endpoint */
@@ -973,7 +973,7 @@ public function searchShards($params = array())
$index = $this->extractArgument($params, 'index');
$type = $this->extractArgument($params, 'type');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\SearchShards $endpoint */
@@ -999,7 +999,7 @@ public function searchTemplate($params = array())
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Search $endpoint */
@@ -1027,7 +1027,7 @@ public function scroll($params = array())
$body = $this->extractArgument($params, 'body');
$scroll = $this->extractArgument($params, 'scroll');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Scroll $endpoint */
@@ -1054,7 +1054,7 @@ public function clearScroll($params = array())
$scrollID = $this->extractArgument($params, 'scroll_id');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\ClearScroll $endpoint */
@@ -1096,7 +1096,7 @@ public function update($params)
$type = $this->extractArgument($params, 'type');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Update $endpoint */
@@ -1189,7 +1189,7 @@ public function updateByQuery($params = array())
$type = $this->extractArgument($params, 'type');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\UpdateByQuery $endpoint */
@@ -1215,7 +1215,7 @@ public function getScript($params)
$id = $this->extractArgument($params, 'id');
$lang = $this->extractArgument($params, 'lang');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Script\Get $endpoint */
@@ -1240,7 +1240,7 @@ public function deleteScript($params)
$id = $this->extractArgument($params, 'id');
$lang = $this->extractArgument($params, 'lang');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Script\Delete $endpoint */
@@ -1266,7 +1266,7 @@ public function putScript($params)
$lang = $this->extractArgument($params, 'lang');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Script\Put $endpoint */
@@ -1289,7 +1289,7 @@ public function getTemplate($params)
{
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Template\Get $endpoint */
@@ -1311,7 +1311,7 @@ public function deleteTemplate($params)
{
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Template\Delete $endpoint */
@@ -1339,7 +1339,7 @@ public function fieldStats($params = array())
$index = $this->extractArgument($params, 'index');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\FieldStats $endpoint */
@@ -1366,7 +1366,7 @@ public function fieldCaps($params = array())
$index = $this->extractArgument($params, 'index');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\FieldCaps $endpoint */
@@ -1390,7 +1390,7 @@ public function renderSearchTemplate($params = array())
$body = $this->extractArgument($params, 'body');
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\RenderSearchTemplate $endpoint */
diff --git a/src/Elasticsearch/Connections/Connection.php b/src/Elasticsearch/Connections/Connection.php
index 63a2cfe84..b31de569f 100644
--- a/src/Elasticsearch/Connections/Connection.php
+++ b/src/Elasticsearch/Connections/Connection.php
@@ -585,7 +585,7 @@ private function buildCurlCommand($method, $uri, $body)
* @param array $request
* @param array $response
* @param array $ignore
- * @throws \Elasticsearch\Common\Exceptions\AlreadyExpiredException|\Elasticsearch\Common\Exceptions\BadRequest400Exception|\Elasticsearch\Common\Exceptions\Conflict409Exception|\Elasticsearch\Common\Exceptions\Forbidden403Exception|\Elasticsearch\Common\Exceptions\Missing404Exception|\Elasticsearch\Common\Exceptions\ScriptLangNotSupportedException|null
+ * @throws \Elasticsearch\Common\Exceptions\AlreadyExpiredException|\Elasticsearch\Common\Exceptions\BadRequest400Exception|\Elasticsearch\Common\Exceptions\Conflict409Exception|\Elasticsearch\Common\Exceptions\Forbidden403Exception|\Elasticsearch\Common\Exceptions\Missing404Exception|\Elasticsearch\Common\Exceptions\ScriptLangNotSupportedException
*/
private function process4xxError($request, $response, $ignore)
{
diff --git a/src/Elasticsearch/Namespaces/CatNamespace.php b/src/Elasticsearch/Namespaces/CatNamespace.php
index 3bc1da318..a12aefa51 100644
--- a/src/Elasticsearch/Namespaces/CatNamespace.php
+++ b/src/Elasticsearch/Namespaces/CatNamespace.php
@@ -30,7 +30,7 @@ public function aliases($params = array())
{
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Aliases $endpoint */
@@ -57,7 +57,7 @@ public function allocation($params = array())
{
$nodeID = $this->extractArgument($params, 'node_id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Allocation $endpoint */
@@ -83,7 +83,7 @@ public function count($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Count $endpoint */
@@ -108,7 +108,7 @@ public function count($params = array())
*/
public function health($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Health $endpoint */
@@ -127,7 +127,7 @@ public function health($params = array())
*/
public function help($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Help $endpoint */
@@ -154,7 +154,7 @@ public function indices($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Indices $endpoint */
@@ -178,7 +178,7 @@ public function indices($params = array())
*/
public function master($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Master $endpoint */
@@ -201,7 +201,7 @@ public function master($params = array())
*/
public function nodes($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Nodes $endpoint */
@@ -224,7 +224,7 @@ public function nodes($params = array())
*/
public function nodeAttrs($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\NodeAttrs $endpoint */
@@ -247,7 +247,7 @@ public function nodeAttrs($params = array())
*/
public function pendingTasks($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\PendingTasks $endpoint */
@@ -273,7 +273,7 @@ public function recovery($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Recovery $endpoint */
@@ -297,7 +297,7 @@ public function recovery($params = array())
*/
public function repositories($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Repositories $endpoint */
@@ -323,7 +323,7 @@ public function shards($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Shards $endpoint */
@@ -351,7 +351,7 @@ public function snapshots($params = array())
{
$repository = $this->extractArgument($params, 'repository');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Snapshots $endpoint */
@@ -379,7 +379,7 @@ public function threadPool($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\ThreadPool $endpoint */
@@ -407,7 +407,7 @@ public function fielddata($params = array())
{
$fields = $this->extractArgument($params, 'fields');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Fielddata $endpoint */
@@ -431,7 +431,7 @@ public function fielddata($params = array())
*/
public function plugins($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Plugins $endpoint */
@@ -454,7 +454,7 @@ public function segments($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Segments $endpoint */
@@ -483,7 +483,7 @@ public function segments($params = array())
*/
public function tasks($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Tasks $endpoint */
@@ -509,7 +509,7 @@ public function templates($params = array())
{
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cat\Templates $endpoint */
diff --git a/src/Elasticsearch/Namespaces/ClusterNamespace.php b/src/Elasticsearch/Namespaces/ClusterNamespace.php
index b9f07f16f..2f5f452f2 100644
--- a/src/Elasticsearch/Namespaces/ClusterNamespace.php
+++ b/src/Elasticsearch/Namespaces/ClusterNamespace.php
@@ -34,7 +34,7 @@ public function health($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Health $endpoint */
@@ -59,7 +59,7 @@ public function reroute($params = array())
{
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Reroute $endpoint */
@@ -89,7 +89,7 @@ public function state($params = array())
$index = $this->extractArgument($params, 'index');
$metric = $this->extractArgument($params, 'metric');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\State $endpoint */
@@ -113,7 +113,7 @@ public function stats($params = array())
{
$nodeID = $this->extractArgument($params, 'node_id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Stats $endpoint */
@@ -135,7 +135,7 @@ public function putSettings($params = array())
{
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Settings\Put $endpoint */
@@ -153,7 +153,7 @@ public function putSettings($params = array())
*/
public function getSettings($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Settings\Put $endpoint */
@@ -173,7 +173,7 @@ public function getSettings($params = array())
*/
public function pendingTasks($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\PendingTasks $endpoint */
@@ -194,7 +194,7 @@ public function allocationExplain($params = array())
{
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\AllocationExplain $endpoint */
@@ -214,7 +214,7 @@ public function allocationExplain($params = array())
*/
public function remoteInfo($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\RemoteInfo $endpoint */
diff --git a/src/Elasticsearch/Namespaces/IndicesNamespace.php b/src/Elasticsearch/Namespaces/IndicesNamespace.php
index 77fb3234a..0d7d84f01 100644
--- a/src/Elasticsearch/Namespaces/IndicesNamespace.php
+++ b/src/Elasticsearch/Namespaces/IndicesNamespace.php
@@ -29,7 +29,7 @@ public function exists($params)
//manually make this verbose so we can check status code
$params['client']['verbose'] = true;
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Exists $endpoint */
@@ -57,7 +57,7 @@ public function get($params)
$index = $this->extractArgument($params, 'index');
$feature = $this->extractArgument($params, 'feature');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Get $endpoint */
@@ -84,7 +84,7 @@ public function segments($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Segments $endpoint */
@@ -107,7 +107,7 @@ public function deleteTemplate($params)
{
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Template\Delete $endpoint */
@@ -130,7 +130,7 @@ public function delete($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Delete $endpoint */
@@ -173,7 +173,7 @@ public function stats($params = array())
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Stats $endpoint */
@@ -199,7 +199,7 @@ public function putSettings($params = array())
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Settings\Put $endpoint */
@@ -225,7 +225,7 @@ public function snapshotIndex($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Gateway\Snapshot $endpoint */
@@ -252,7 +252,7 @@ public function shrink($params = array())
$target = $this->extractArgument($params, 'target');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Shrink $endpoint */
@@ -278,7 +278,7 @@ public function getMapping($params = array())
$type = $this->extractArgument($params, 'type');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Mapping\Get $endpoint */
@@ -311,7 +311,7 @@ public function getFieldMapping($params = array())
}
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Mapping\GetField $endpoint */
@@ -342,7 +342,7 @@ public function flush($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Flush $endpoint */
@@ -370,7 +370,7 @@ public function flushSynced($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Flush $endpoint */
@@ -398,7 +398,7 @@ public function refresh($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Refresh $endpoint */
@@ -423,7 +423,7 @@ public function recovery($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Flush $endpoint */
@@ -454,7 +454,7 @@ public function existsType($params)
//manually make this verbose so we can check status code
$params['client']['verbose'] = true;
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Type\Exists $endpoint */
@@ -484,7 +484,7 @@ public function putAlias($params = array())
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Alias\Put $endpoint */
@@ -514,7 +514,7 @@ public function putTemplate($params)
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Template\Put $endpoint */
@@ -547,7 +547,7 @@ public function validateQuery($params = array())
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Validate\Query $endpoint */
@@ -576,7 +576,7 @@ public function getAlias($params)
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Alias\Get $endpoint */
@@ -607,7 +607,7 @@ public function putMapping($params)
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Mapping\Put $endpoint */
@@ -634,7 +634,7 @@ public function deleteMapping($params)
$type = $this->extractArgument($params, 'type');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Mapping\Delete $endpoint */
@@ -657,7 +657,7 @@ public function getTemplate($params)
{
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Template\Get $endpoint */
@@ -682,7 +682,7 @@ public function existsTemplate($params)
//manually make this verbose so we can check status code
$params['client']['verbose'] = true;
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Template\Exists $endpoint */
@@ -708,7 +708,7 @@ public function create($params)
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Create $endpoint */
@@ -740,7 +740,7 @@ public function forceMerge($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\ForceMerge $endpoint */
@@ -766,7 +766,7 @@ public function deleteAlias($params)
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Alias\Delete $endpoint */
@@ -790,7 +790,7 @@ public function open($params)
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Open $endpoint */
@@ -826,7 +826,7 @@ public function analyze($params = array())
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Analyze $endpoint */
@@ -861,7 +861,7 @@ public function clearCache($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Cache\Clear $endpoint */
@@ -887,7 +887,7 @@ public function updateAliases($params = array())
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Aliases\Update $endpoint */
@@ -913,7 +913,7 @@ public function getAliases($params = array())
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Alias\Get $endpoint */
@@ -945,7 +945,7 @@ public function existsAlias($params)
//manually make this verbose so we can check status code
$params['client']['verbose'] = true;
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Alias\Exists $endpoint */
@@ -972,7 +972,7 @@ public function status($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Status $endpoint */
@@ -996,7 +996,7 @@ public function getSettings($params = array())
$name = $this->extractArgument($params, 'name');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Settings\Get $endpoint */
@@ -1020,7 +1020,7 @@ public function close($params)
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Close $endpoint */
@@ -1042,7 +1042,7 @@ public function seal($params)
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Seal $endpoint */
@@ -1070,7 +1070,7 @@ public function upgrade($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Upgrade\Post $endpoint */
@@ -1098,7 +1098,7 @@ public function getUpgrade($params = array())
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Upgrade\Get $endpoint */
@@ -1125,7 +1125,7 @@ public function shardStores($params)
{
$index = $this->extractArgument($params, 'index');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\ShardStores $endpoint */
@@ -1152,7 +1152,7 @@ public function rollover($params)
$alias = $this->extractArgument($params, 'alias');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Rollover $endpoint */
@@ -1184,7 +1184,7 @@ public function split($params = array())
$body = $this->extractArgument($params, 'body');
$target = $this->extractArgument($params, 'target');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Indices\Split $endpoint */
diff --git a/src/Elasticsearch/Namespaces/IngestNamespace.php b/src/Elasticsearch/Namespaces/IngestNamespace.php
index a0136302a..d1b60054e 100644
--- a/src/Elasticsearch/Namespaces/IngestNamespace.php
+++ b/src/Elasticsearch/Namespaces/IngestNamespace.php
@@ -33,7 +33,7 @@ public function deletePipeline($params = array())
{
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Delete $endpoint */
@@ -55,7 +55,7 @@ public function getPipeline($params = array())
{
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Get $endpoint */
@@ -79,7 +79,7 @@ public function putPipeline($params = array())
$body = $this->extractArgument($params, 'body');
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Put $endpoint */
@@ -103,7 +103,7 @@ public function simulate($params = array())
$body = $this->extractArgument($params, 'body');
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Simulate $endpoint */
@@ -124,7 +124,7 @@ public function simulate($params = array())
*/
public function processorGrok($params = [])
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var ProcessorGrok $endpoint */
diff --git a/src/Elasticsearch/Namespaces/NodesNamespace.php b/src/Elasticsearch/Namespaces/NodesNamespace.php
index cffafbec3..f522d0ff5 100644
--- a/src/Elasticsearch/Namespaces/NodesNamespace.php
+++ b/src/Elasticsearch/Namespaces/NodesNamespace.php
@@ -44,7 +44,7 @@ public function stats($params = array())
$index_metric = $this->extractArgument($params, 'index_metric');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Nodes\Stats $endpoint */
@@ -73,7 +73,7 @@ public function info($params = array())
$nodeID = $this->extractArgument($params, 'node_id');
$metric = $this->extractArgument($params, 'metric');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Nodes\Info $endpoint */
@@ -99,7 +99,7 @@ public function hotThreads($params = array())
{
$nodeID = $this->extractArgument($params, 'node_id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Nodes\HotThreads $endpoint */
@@ -121,7 +121,7 @@ public function reloadSecureSettings($params = array())
{
$nodeID = $this->extractArgument($params, 'node_id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Cluster\Nodes\ReloadSecureSettings $endpoint */
diff --git a/src/Elasticsearch/Namespaces/RemoteNamespace.php b/src/Elasticsearch/Namespaces/RemoteNamespace.php
index 7af2bc0e9..4177475c9 100644
--- a/src/Elasticsearch/Namespaces/RemoteNamespace.php
+++ b/src/Elasticsearch/Namespaces/RemoteNamespace.php
@@ -24,7 +24,7 @@ class RemoteNamespace extends AbstractNamespace
*/
public function info($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Info $endpoint */
diff --git a/src/Elasticsearch/Namespaces/SnapshotNamespace.php b/src/Elasticsearch/Namespaces/SnapshotNamespace.php
index 9abfb65a5..02bb585a0 100644
--- a/src/Elasticsearch/Namespaces/SnapshotNamespace.php
+++ b/src/Elasticsearch/Namespaces/SnapshotNamespace.php
@@ -29,7 +29,7 @@ public function create($params = array())
$snapshot = $this->extractArgument($params, 'snapshot');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Create $endpoint */
@@ -55,7 +55,7 @@ public function createRepository($params = array())
$repository = $this->extractArgument($params, 'repository');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Repository\Create $endpoint */
@@ -79,7 +79,7 @@ public function delete($params = array())
$repository = $this->extractArgument($params, 'repository');
$snapshot = $this->extractArgument($params, 'snapshot');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Delete $endpoint */
@@ -103,7 +103,7 @@ public function deleteRepository($params = array())
{
$repository = $this->extractArgument($params, 'repository');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Repository\Delete $endpoint */
@@ -126,7 +126,7 @@ public function get($params = array())
$repository = $this->extractArgument($params, 'repository');
$snapshot = $this->extractArgument($params, 'snapshot');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Get $endpoint */
@@ -150,7 +150,7 @@ public function getRepository($params = array())
{
$repository = $this->extractArgument($params, 'repository');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Repository\Get $endpoint */
@@ -175,7 +175,7 @@ public function restore($params = array())
$snapshot = $this->extractArgument($params, 'snapshot');
$body = $this->extractArgument($params, 'body');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Restore $endpoint */
@@ -200,7 +200,7 @@ public function status($params = array())
$repository = $this->extractArgument($params, 'repository');
$snapshot = $this->extractArgument($params, 'snapshot');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Status $endpoint */
@@ -224,7 +224,7 @@ public function verifyRepository($params = array())
{
$repository = $this->extractArgument($params, 'repository');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var \Elasticsearch\Endpoints\Snapshot\Repository\Verify $endpoint */
diff --git a/src/Elasticsearch/Namespaces/TasksNamespace.php b/src/Elasticsearch/Namespaces/TasksNamespace.php
index cb643a483..09ef6f279 100644
--- a/src/Elasticsearch/Namespaces/TasksNamespace.php
+++ b/src/Elasticsearch/Namespaces/TasksNamespace.php
@@ -29,7 +29,7 @@ public function get($params = array())
{
$id = $this->extractArgument($params, 'task_id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Get $endpoint */
@@ -56,7 +56,7 @@ public function get($params = array())
public function tasksList($params = array())
{
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Get $endpoint */
@@ -80,7 +80,7 @@ public function cancel($params = array())
{
$id = $this->extractArgument($params, 'id');
- /** @var callback $endpointBuilder */
+ /** @var callable $endpointBuilder */
$endpointBuilder = $this->endpoints;
/** @var Cancel $endpoint */
diff --git a/tests/Elasticsearch/Tests/ClientIntegrationTests.php b/tests/Elasticsearch/Tests/ClientIntegrationTests.php
index ff7030ea7..55bc3b456 100644
--- a/tests/Elasticsearch/Tests/ClientIntegrationTests.php
+++ b/tests/Elasticsearch/Tests/ClientIntegrationTests.php
@@ -20,7 +20,9 @@ class ClientIntegrationTests extends \PHPUnit\Framework\TestCase
{
public function testCustomQueryParams()
{
- $client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build();
+ $client = Elasticsearch\ClientBuilder::create()
+ ->setHosts([getenv('ES_TEST_HOST')])
+ ->build();
$getParams = [
'index' => 'test',
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php b/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php
index 63529be32..e4a0aa604 100644
--- a/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php
+++ b/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php
@@ -27,7 +27,7 @@ protected function setUp()
public function testSniff()
{
$client = ClientBuilder::create()
- ->setHosts([$_SERVER['ES_TEST_HOST']])
+ ->setHosts([getenv('ES_TEST_HOST')])
->setConnectionPool(SniffingConnectionPool::class, ['sniffingInterval' => -10])
->build();
diff --git a/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php b/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php
index 0e7578be1..a7a0ee27f 100644
--- a/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php
+++ b/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php
@@ -18,11 +18,20 @@
*/
class StaticConnectionPoolIntegrationTest extends \PHPUnit\Framework\TestCase
{
+ public function setUp()
+ {
+ if (empty(getenv('ES_TEST_HOST'))) {
+ $this->markTestSkipped(
+ 'Elasticsearch is not configured. Check the ES_TEST_HOST env in your phpunit.xml file.'
+ );
+ }
+ }
+
// Issue #636
public function test404Liveness()
{
$client = \Elasticsearch\ClientBuilder::create()
- ->setHosts([$_SERVER['ES_TEST_HOST']])
+ ->setHosts([getenv('ES_TEST_HOST')])
->setConnectionPool(\Elasticsearch\ConnectionPool\StaticConnectionPool::class)
->build();
diff --git a/tests/Elasticsearch/Tests/YamlRunnerTest.php b/tests/Elasticsearch/Tests/YamlRunnerTest.php
index 5631812e6..bdd823880 100644
--- a/tests/Elasticsearch/Tests/YamlRunnerTest.php
+++ b/tests/Elasticsearch/Tests/YamlRunnerTest.php
@@ -56,7 +56,9 @@ class YamlRunnerTest extends \PHPUnit\Framework\TestCase
];
private static $skippedTests = [
-
+ 'nodes.stats/30_discovery.yml#Discovery stats' => 'Failing on ES 6.1+: nodes.$master.discovery is an empty array, expected to have cluster_state_queue field in it',
+ 'indices.stats/20_translog.yml#Translog retention' => 'Failing on ES 6.3+: Failed asserting that 495 is equal to or is less than \'$creation_size\'',
+ 'indices.shrink/30_copy_settings.yml#Copy settings during shrink index' => 'Failing on ES 6.4+: Failed to match in test "Copy settings during shrink index". Expected [\'4\'] does not match [false] '
];
/** @var array A list of skipped test with their reasons */
@@ -105,8 +107,8 @@ class YamlRunnerTest extends \PHPUnit\Framework\TestCase
*/
public static function getHost(): string
{
- if (isset($_SERVER['ES_TEST_HOST']) === true) {
- return $_SERVER['ES_TEST_HOST'];
+ if (getenv('ES_TEST_HOST') !== false) {
+ return getenv('ES_TEST_HOST');
}
echo 'Environment variable for elasticsearch test cluster (ES_TEST_HOST) not defined. Exiting yaml test';
@@ -793,7 +795,7 @@ public function yamlProvider(): array
// *.yaml files should be included until the library is ES 6.0+ only
$finder->name('*.yaml');
- $filter = isset($_SERVER['TEST_CASE']) ? $_SERVER['TEST_CASE'] : null;
+ $filter = getenv('TEST_CASE') !== false ? getenv('TEST_CASE') : null;
/** @var SplFileInfo $file */
foreach ($finder as $file) {
diff --git a/travis/run_es_docker.sh b/travis/run_es_docker.sh
new file mode 100755
index 000000000..ed104c4ef
--- /dev/null
+++ b/travis/run_es_docker.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+if [ -z $ES_VERSION ]; then
+ echo "No ES_VERSION specified";
+ exit 1;
+fi;
+
+docker pull docker.elastic.co/elasticsearch/elasticsearch-oss:${ES_VERSION}
+docker network inspect esnet-oss > /dev/null || docker network create esnet-oss;
+docker run \
+ --rm \
+ --publish 9200:9200 \
+ --env "node.attr.testattr=test" \
+ --env "path.repo=/tmp" \
+ --env "repositories.url.allowed_urls=http://snapshot.*" \
+ --env "discovery.type=single-node" \
+ --network=esnet-oss \
+ --name=elasticsearch-oss \
+ --detach \
+ docker.elastic.co/elasticsearch/elasticsearch-oss:${ES_VERSION}
+docker run --network esnet-oss --rm appropriate/curl --max-time 120 --retry 120 --retry-delay 1 --retry-connrefused --show-error --silent http://elasticsearch-oss:9200