Compare commits

...

4 Commits

Author SHA1 Message Date
Till Krüss 99c253733d tweak changelog format 2022-06-08 06:14:56 -07:00
Till Krüss 69bb8fa082 bump version to v2.0.0 stable 2022-06-08 06:11:35 -07:00
Josias Montag e5221fa13b Allow PubSub / MultiExec with Replication 2022-05-28 08:18:01 -07:00
Till Krüss 15244c9642 cleanup readme 2022-05-26 12:01:30 -07:00
9 changed files with 24 additions and 26 deletions
+9 -2
View File
@@ -1,5 +1,6 @@
v2.0.0-beta.1 (2022-05-26)
================================================================================
## Changelog
## v2.0.0 (2022-06-08)
- Dropped support for PHP 7.1 and older
@@ -106,6 +107,8 @@ v2.0.0-beta.1 (2022-05-26)
class now passes the second argument as an integer value `0` as its default
value instead of `null`.
- Support Pub/Sub and Pipelines when using replication
- The class `Predis\Transaction\AbortedMultiExecException` now uses the correct
default types for the `$code` (integer) parameter.
@@ -120,3 +123,7 @@ v2.0.0-beta.1 (2022-05-26)
- __FIX__: the value returned from `getArgument()` in `parseResponse()`method,
part of `Predis\Command\Redis\SENTINEL` class, is checked to not pass `null`
to `strtolower()` function.
## v2.0.0-beta.1 (2022-05-26)
Same as v2.0.0
+1 -10
View File
@@ -8,21 +8,12 @@
A flexible and feature-complete [Redis](http://redis.io) client for PHP 7.2 and newer.
__ATTENTION:__ you are on the README file of an unstable branch of Predis specifically meant for the
development of future releases. This means that the code on this branch is potentially unstable, and
breaking change may happen without any prior notice. Do not use it in production environments or use
it at your own risk!
Predis does not require any additional C extension by default, but it can be optionally paired with
[phpiredis](https://github.com/nrk/phpiredis) to lower the overhead of the serialization and parsing
of the [Redis RESP Protocol](http://redis.io/topics/protocol).
More details about this project can be found on the [frequently asked questions](FAQ.md).
## Main features ##
- Support for Redis from __2.0__ to __6.0__.
- Support for Redis from __3.0__ to __7.0__.
- Support for clustering using client-side sharding and pluggable keyspace distributors.
- Support for [redis-cluster](http://redis.io/topics/cluster-tutorial) (Redis >= 3.0).
- Support for master-slave replication setups and [redis-sentinel](http://redis.io/topics/sentinel).
+1 -1
View File
@@ -1 +1 @@
2.0.0-beta.1
2.0.0
+1 -1
View File
@@ -40,7 +40,7 @@ use Predis\Transaction\MultiExec as MultiExecTransaction;
*/
class Client implements ClientInterface, \IteratorAggregate
{
const VERSION = '2.0.0-beta.1';
const VERSION = '2.0.0';
/** @var OptionsInterface */
private $options;
+3 -3
View File
@@ -12,7 +12,7 @@
namespace Predis\Monitor;
use Predis\ClientInterface;
use Predis\Connection\AggregateConnectionInterface;
use Predis\Connection\Cluster\ClusterInterface;
use Predis\NotSupportedException;
/**
@@ -56,9 +56,9 @@ class Consumer implements \Iterator
*/
private function assertClient(ClientInterface $client)
{
if ($client->getConnection() instanceof AggregateConnectionInterface) {
if ($client->getConnection() instanceof ClusterInterface) {
throw new NotSupportedException(
'Cannot initialize a monitor consumer over aggregate connections.'
'Cannot initialize a monitor consumer over cluster connections.'
);
}
+3 -3
View File
@@ -14,7 +14,7 @@ namespace Predis\PubSub;
use Predis\ClientException;
use Predis\ClientInterface;
use Predis\Command\Command;
use Predis\Connection\AggregateConnectionInterface;
use Predis\Connection\Cluster\ClusterInterface;
use Predis\NotSupportedException;
/**
@@ -62,9 +62,9 @@ class Consumer extends AbstractConsumer
*/
private function checkCapabilities(ClientInterface $client)
{
if ($client->getConnection() instanceof AggregateConnectionInterface) {
if ($client->getConnection() instanceof ClusterInterface) {
throw new NotSupportedException(
'Cannot initialize a PUB/SUB consumer over aggregate connections.'
'Cannot initialize a PUB/SUB consumer over cluster connections.'
);
}
+3 -3
View File
@@ -16,7 +16,7 @@ use Predis\ClientException;
use Predis\ClientInterface;
use Predis\Command\CommandInterface;
use Predis\CommunicationException;
use Predis\Connection\AggregateConnectionInterface;
use Predis\Connection\Cluster\ClusterInterface;
use Predis\NotSupportedException;
use Predis\Protocol\ProtocolException;
use Predis\Response\ErrorInterface as ErrorResponseInterface;
@@ -66,9 +66,9 @@ class MultiExec implements ClientContextInterface
*/
private function assertClient(ClientInterface $client)
{
if ($client->getConnection() instanceof AggregateConnectionInterface) {
if ($client->getConnection() instanceof ClusterInterface) {
throw new NotSupportedException(
'Cannot initialize a MULTI/EXEC transaction over aggregate connections.'
'Cannot initialize a MULTI/EXEC transaction over cluster connections.'
);
}
+2 -2
View File
@@ -46,9 +46,9 @@ class ConsumerTest extends PredisTestCase
public function testMonitorConsumerDoesNotWorkOnClusters(): void
{
$this->expectException('Predis\NotSupportedException');
$this->expectExceptionMessage('Cannot initialize a monitor consumer over aggregate connections');
$this->expectExceptionMessage('Cannot initialize a monitor consumer over cluster connections');
$cluster = $this->getMockBuilder('Predis\Connection\AggregateConnectionInterface')->getMock();
$cluster = $this->getMockBuilder('Predis\Connection\Cluster\ClusterInterface')->getMock();
$client = new Client($cluster);
new MonitorConsumer($client);
+1 -1
View File
@@ -45,7 +45,7 @@ class ConsumerTest extends PredisTestCase
public function testPubSubConsumerDoesNotWorkOnClusters(): void
{
$this->expectException('Predis\NotSupportedException');
$this->expectExceptionMessage('Cannot initialize a PUB/SUB consumer over aggregate connections');
$this->expectExceptionMessage('Cannot initialize a PUB/SUB consumer over cluster connections');
$cluster = $this->getMockBuilder('Predis\Connection\Cluster\ClusterInterface')->getMock();
$client = new Client($cluster);