A streaming Redis protocol (RESP) parser and serializer written in pure PHP.
MIT License
RequestParser
that also support the oldFactory
now has two distinct methods to create parsers:
createResponseParser()
for a client-side librarycreateRequestParser()
for a server-side library / testing frameworkpushIncoming()
returns an array of allphp ModelInterface::getMessageSerialized($serializer)
Re-organize the whole API into dedicated
Parser
(protocol reader) andSerializer
(protocol writer) sub-namespaces. (#4)Use of the factory has now been unified:
$factory = new Clue\Redis\Protocol\Factory();
$parser = $factory->createParser();
$serializer = $factory->createSerializer();
Add a dedicated Model
for each type of reply. Among others, this now allows
you to distinguish a single line StatusReply
from a binary-safe BulkReply
. (#2)
Fix parsing binary values and do not trip over trailing/leading whitespace. (#4)
Improve parser and serializer performance by up to 20%. (#4)