diff --git a/composer.json b/composer.json index ab46475..6f72281 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^8", "guzzlehttp/guzzle": "^6.5.8|^7.4.5", - "jms/serializer": "^3.28", + "jms/serializer": "3.24.0", "simple-bus/jms-serializer-bridge": "^6.3.1" }, "require-dev": { diff --git a/src/SearchClient.php b/src/SearchClient.php index 9551908..28b2fec 100644 --- a/src/SearchClient.php +++ b/src/SearchClient.php @@ -64,6 +64,9 @@ private function search(SearchQueryInterface $searchQuery, $type): PagedCollecti $result = $this->client->request('GET', $type, $options); - return $this->serializer->deserialize($result->getBody()->getContents()); + $body = $result->getBody(); + $body->rewind(); + + return $this->serializer->deserialize($body->getContents()); } }