Skip to content

Commit

Permalink
Fix test and cast document ID to string
Browse files Browse the repository at this point in the history
  • Loading branch information
sidz committed Mar 24, 2024
1 parent 1046d27 commit 49a378a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions tests/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 49a378a

Please sign in to comment.