mirror of
https://github.com/predis/predis.git
synced 2026-10-28 14:48:14 +00:00
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:
committed by
GitHub
parent
55f6980594
commit
9b7963be8a
+6
-1
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user