Drop support for streamable multibulk responses.

Supporting this feature has been problematic and leaded to some ugly
code to make abstractions such as pipelines and transactions aware of
these kind of response objects. Furthermore, it was not possible to
add them to all the connection classes due to implementation limits.

For such reasons Predis do not support them globally anymore, but the
actual classes are still shipped within the library so that they can
be used to build custom stuff at a level lower than client (that is,
unless we decide to remove them for good before going stable).
This commit is contained in:
Daniele Alessandri
2013-11-09 12:07:36 +01:00
parent 7c5aba08cd
commit fb2d8a37c1
17 changed files with 32 additions and 214 deletions
@@ -87,20 +87,6 @@ class StreamConnectionTest extends ConnectionTestCase
$this->assertTrue($connection->isConnected());
}
/**
* @group connected
*/
public function testReadsMultibulkRepliesAsIterators()
{
$connection = $this->getConnection($profile, true, array('iterable_multibulk' => true));
$connection->executeCommand($profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')));
$connection->writeCommand($profile->createCommand('lrange', array('metavars', 0, -1)));
$this->assertInstanceOf('Predis\Iterator\MultiBulkResponse', $iterator = $connection->read());
$this->assertSame(array('foo', 'hoge', 'lol'), iterator_to_array($iterator));
}
/**
* @group connected
* @expectedException Predis\Protocol\ProtocolException