diff --git a/src/Index.php b/src/Index.php index 4f001e3a5..f5a91e874 100644 --- a/src/Index.php +++ b/src/Index.php @@ -297,7 +297,7 @@ public function getDocument($id, array $options = []): Document $data = []; } - $doc = new Document($id, $data, $this->getName()); + $doc = new Document((string) $id, $data, $this->getName()); $doc->setVersionParams($result); return $doc; diff --git a/tests/Base.php b/tests/Base.php index 6adf4d620..e77ab3dd5 100644 --- a/tests/Base.php +++ b/tests/Base.php @@ -46,11 +46,11 @@ protected static function showDeprecated(): void } /** - * @param array $params Additional configuration params. Host and Port are already set + * @param array $config Additional configuration params. Host and Port are already set */ - protected function _getClient(array $params = [], ?LoggerInterface $logger = null): Client + protected function _getClient(array $config = [], ?LoggerInterface $logger = null): Client { - $config = $params ?: [$this->_getHost().':'.$this->_getPort()]; + $config['hosts'] ??= [$this->_getHost().':'.$this->_getPort()]; $config['transport_config']['node_pool'] = $config['transport_config']['node_pool'] ?? new TraceableSimpleNodePool( new RoundRobin(),