Skip to content

Commit

Permalink
Merge remote-tracking branch 'elasticsearch-php/fix/7.4.2' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Aug 11, 2020
2 parents 39eb8c0 + e8ab8d0 commit a80f54b
Show file tree
Hide file tree
Showing 23 changed files with 9 additions and 187 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Release 7.4.2

- Fixed indexing fails for item IDs that contain slashes
[#1048](https://github.com/elastic/elasticsearch-php/issues/1048)
[#1017](https://github.com/elastic/elasticsearch-php/pull/1017)

## Release 7.4.1

- We added the suppress operator `@` for the deprecation messages `@trigger_error()`.
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
class Client
{
const VERSION = '7.4.1';
const VERSION = '7.4.2';

/**
* @var Transport
Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Endpoints/AbstractEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function setType(?string $type)
*
* @return $this
*/
public function setID($docID)
public function setId($docID)
{
if ($docID === null) {
return $this;
Expand Down
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,4 @@ public function setBody($body): Create

return $this;
}

public function setId($id): Create
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): Delete
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/DeleteScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): DeleteScript
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Exists.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,4 @@ public function getMethod(): string
{
return 'HEAD';
}

public function setId($id): Exists
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/ExistsSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,4 @@ public function getMethod(): string
{
return 'HEAD';
}

public function setId($id): ExistsSource
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Explain.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,4 @@ public function setBody($body): Explain

return $this;
}

public function setId($id): Explain
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): Get
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/GetScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetScript
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/GetSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetSource
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,4 @@ public function setBody($body): Index

return $this;
}

public function setId($id): Index
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): DeletePipeline
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/GetPipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetPipeline
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/PutPipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,4 @@ public function setBody($body): PutPipeline

return $this;
}

public function setId($id): PutPipeline
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/Simulate.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,4 @@ public function setBody($body): Simulate

return $this;
}

public function setId($id): Simulate
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/PutScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ public function setBody($body): PutScript
return $this;
}

public function setId($id): PutScript
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}

public function setContext($context): PutScript
{
if (isset($context) !== true) {
Expand Down
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/RenderSearchTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,4 @@ public function setBody($body): RenderSearchTemplate

return $this;
}

public function setId($id): RenderSearchTemplate
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/TermVectors.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,4 @@ public function setBody($body): TermVectors

return $this;
}

public function setId($id): TermVectors
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,4 @@ public function setBody($body): Update

return $this;
}

public function setId($id): Update
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
4 changes: 0 additions & 4 deletions tests/Elasticsearch/Tests/YamlRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,6 @@ public function operationMatch($operation, $lastOperationResult, &$context, stri
}
}
break;
case 'Basic':
// Fix issue converting "中文" in unicode
$match = is_string($match) ? utf8_decode($match) : $match;
break;
}

$expected = $this->replaceWithContext(current($operation), $context);
Expand Down
2 changes: 1 addition & 1 deletion util/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function renderClass(): string
}
}
foreach ($this->parts as $part => $value) {
if (in_array($part, ['type', 'index'])) {
if (in_array($part, ['type', 'index', 'id'])) {
continue;
}
if (isset($value['type']) && $value['type'] === 'list') {
Expand Down

0 comments on commit a80f54b

Please sign in to comment.