Skip to content

Commit

Permalink
Fixed #1131 using old endpoint naming (#1151)
Browse files Browse the repository at this point in the history
* Fixed #1131 using old endpoint naming

* Removed phpcs for autogenerated files

* FIxed phpstan issue

* Fixed getAliases() in IndicesNamespace

* Updated endpoints with ES 6.8.16

* Set symplify/git-wrapper < 9.3.27
  • Loading branch information
ezimuel authored Jul 14, 2021
1 parent 358d7e7 commit 469c08e
Show file tree
Hide file tree
Showing 281 changed files with 371 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
STACK_VERSION:
- 6.8-SNAPSHOT
- 6.8.16

PHP_VERSION:
- 8.0-cli
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"psr/log": "~1.0"
},
"require-dev": {
"symplify/git-wrapper": "~9.0",
"symplify/git-wrapper": ">=9.0 <9.3.27",
"doctrine/inflector": "^1.3",
"mockery/mockery": "^1.2",
"phpstan/phpstan": "^0.12",
Expand Down Expand Up @@ -52,7 +52,7 @@
},
"scripts": {
"phpcs": [
"phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src",
"phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src --ignore=src/Elasticsearch/Endpoints",
"phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests --ignore=tests/Elasticsearch/Tests/Yaml"
],
"phpstan": [
Expand Down
14 changes: 9 additions & 5 deletions src/Elasticsearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@

use Elasticsearch\Common\Exceptions\BadMethodCallException;
use Elasticsearch\Common\Exceptions\InvalidArgumentException;
use Elasticsearch\Common\Exceptions\NoNodesAvailableException;
use Elasticsearch\Common\Exceptions\BadRequest400Exception;
use Elasticsearch\Common\Exceptions\Missing404Exception;
use Elasticsearch\Common\Exceptions\TransportException;
use Elasticsearch\Endpoints\AbstractEndpoint;
use Elasticsearch\Namespaces\AbstractNamespace;
use Elasticsearch\Namespaces\NamespaceBuilderInterface;
use Elasticsearch\Namespaces\BooleanRequestWrapper;
use Elasticsearch\Namespaces\CatNamespace;
use Elasticsearch\Namespaces\ClusterNamespace;
Expand All @@ -34,7 +39,6 @@
use Elasticsearch\Namespaces\GraphNamespace;
use Elasticsearch\Namespaces\XpackNamespace;
use Elasticsearch\Namespaces\LicenseNamespace;
use Elasticsearch\Namespaces\NamespaceBuilderInterface;
use Elasticsearch\Namespaces\MigrationNamespace;
use Elasticsearch\Namespaces\MlNamespace;
use Elasticsearch\Namespaces\MonitoringNamespace;
Expand All @@ -47,11 +51,11 @@
* Class Client
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Client
{
const VERSION = '6.8.1';
const VERSION = '6.8.2';

/**
* @var Transport
Expand Down Expand Up @@ -870,7 +874,7 @@ public function mtermvectors(array $params = [])
$body = $this->extractArgument($params, 'body');

$endpointBuilder = $this->endpoints;
$endpoint = $endpointBuilder('Mtermvectors');
$endpoint = $endpointBuilder('MTermVectors');
$endpoint->setParams($params);
$endpoint->setIndex($index);
$endpoint->setType($type);
Expand Down Expand Up @@ -1206,7 +1210,7 @@ public function termvectors(array $params = [])
$body = $this->extractArgument($params, 'body');

$endpointBuilder = $this->endpoints;
$endpoint = $endpointBuilder('Termvectors');
$endpoint = $endpointBuilder('TermVectors');
$endpoint->setParams($params);
$endpoint->setIndex($index);
$endpoint->setType($type);
Expand Down
3 changes: 2 additions & 1 deletion src/Elasticsearch/Endpoints/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Elasticsearch API name bulk
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Bulk extends AbstractEndpoint implements BulkEndpointInterface
{
Expand Down Expand Up @@ -91,4 +91,5 @@ public function setBody($body): Bulk
}
return $this;
}

}
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.aliases
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Aliases extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.allocation
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Allocation extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.count
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Count extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Fielddata.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.fielddata
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Fielddata extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.health
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Health extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.help
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Help extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Indices.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.indices
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Indices extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Master.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.master
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Master extends AbstractEndpoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
use Elasticsearch\Endpoints\AbstractEndpoint;

/**
* Class Nodeattrs
* Class NodeAttrs
* Elasticsearch API name cat.nodeattrs
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Nodeattrs extends AbstractEndpoint
class NodeAttrs extends AbstractEndpoint
{

public function getURI(): string
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Nodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.nodes
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Nodes extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/PendingTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.pending_tasks
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class PendingTasks extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.plugins
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Plugins extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Recovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.recovery
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Recovery extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Repositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.repositories
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Repositories extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Segments.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.segments
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Segments extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Shards.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.shards
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Shards extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Snapshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.snapshots
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Snapshots extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.tasks
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Tasks extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.templates
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Templates extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cat/ThreadPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cat.thread_pool
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class ThreadPool extends AbstractEndpoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.delete_auto_follow_pattern
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class DeleteAutoFollowPattern extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/Follow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.follow
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Follow extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/FollowInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.follow_info
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class FollowInfo extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/FollowStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.follow_stats
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class FollowStats extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.forget_follower
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class ForgetFollower extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name ccr.get_auto_follow_pattern
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class GetAutoFollowPattern extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/PauseFollow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.pause_follow
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class PauseFollow extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.put_auto_follow_pattern
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class PutAutoFollowPattern extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.resume_follow
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class ResumeFollow extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name ccr.stats
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Stats extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Ccr/Unfollow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Elasticsearch API name ccr.unfollow
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class Unfollow extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/ClearScroll.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name clear_scroll
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class ClearScroll extends AbstractEndpoint
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Elasticsearch API name cluster.allocation_explain
*
* NOTE: this file is autogenerated using util/GenerateEndpoints.php
* and Elasticsearch 6.8.14 (dab5822)
* and Elasticsearch 6.8.16 (1f62092)
*/
class AllocationExplain extends AbstractEndpoint
{
Expand Down
Loading

0 comments on commit 469c08e

Please sign in to comment.