Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test and cast document ID to string
Browse files Browse the repository at this point in the history
sidz committed Mar 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1046d27 commit 49a378a
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
@@ -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;
6 changes: 3 additions & 3 deletions tests/Base.php
Original file line number Diff line number Diff line change
@@ -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(),

0 comments on commit 49a378a

Please sign in to comment.