Skip to content

Commit 79eb593

Browse files
committed
feat(elasticsearch): introduce v7 support
1 parent d0e57d4 commit 79eb593

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Elasticsearch/State/CollectionProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
7878
throw new Error(status: $response->getStatusCode(), detail: (string) $response->getBody(), title: $response->getReasonPhrase(), originalTrace: $e->getTrace());
7979
}
8080

81-
if ($this->client instanceof Client && $documents instanceof Elasticsearch) {
81+
if (class_exists(Elastic\Elasticsearch\Response\Elasticsearch::class) && $documents instanceof Elasticsearch) {
8282
$documents = $documents->asArray();
8383
}
8484

src/Elasticsearch/State/ItemProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
6969
throw new Error(status: $response->getStatusCode(), detail: (string) $response->getBody(), title: $response->getReasonPhrase(), originalTrace: $e->getTrace());
7070
}
7171

72-
if ($this->client instanceof Client && $documents instanceof Elasticsearch) {
72+
if (class_exists(Elastic\Elasticsearch\Response\Elasticsearch::class) && $documents instanceof Elasticsearch) {
7373
$document = $document->asArray();
7474
}
7575

0 commit comments

Comments
 (0)