Add RESP3 response handle (#1298)

* Add RESP3 response handle

* Fix replication connection to return parameters of any connection role

* Removed expectations on unstable error messages

* Codestyle fixes
This commit is contained in:
Vladyslav Vildanov
2023-05-18 11:04:32 +03:00
committed by GitHub
parent 55f6980594
commit 9b7963be8a
26 changed files with 420 additions and 8 deletions
+6 -1
View File
@@ -347,6 +347,7 @@ class Client implements ClientInterface, IteratorAggregate
public function executeCommand(CommandInterface $command)
{
$response = $this->connection->executeCommand($command);
$parameters = $this->connection->getParameters();
if ($response instanceof ResponseInterface) {
if ($response instanceof ErrorResponseInterface) {
@@ -356,7 +357,11 @@ class Client implements ClientInterface, IteratorAggregate
return $response;
}
return $command->parseResponse($response);
if ($parameters->protocol === 2) {
return $command->parseResponse($response);
}
return $command->parseResp3Response($response);
}
/**