Compare commits

..

2 Commits

Author SHA1 Message Date
Till Krüss 7d86f7afb3 Prepare 3.0 release (#1533) 2025-05-02 16:18:59 -07:00
Vladyslav Vildanov aa72649e43 8.0-RC2 testing (#1531) 2025-04-29 08:25:18 -07:00
6 changed files with 28 additions and 41 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
run: |
# Mapping of original redis versions to client test containers
declare -A redis_clients_version_mapping=(
["8.0"]="8.0-M05-pre"
["8.0"]="8.0-RC2-pre"
["7.4"]="7.4.2"
["7.2"]="7.2.7"
)
+18 -33
View File
@@ -1,46 +1,30 @@
## Changelog
## Unreleased
## v3.0.0-RC1 (2025-04-17)
### Breaking Changes
- Remove deprecated Triggers & Functions support (#1524)
- Changed default `DIALECT` to 2 (#1516)
- Implemented PSR-7 compatible stream abstraction (#1450)
- Improved pipeline abstractions (#1438)
- Improved connection handshake (#1431)
- Added support for transactions for clustered connections (#1497)
- Extended ClusterInterface with new `getClusterStrategy()` method (#1497)
- Extended StrategyInterface with new `checkSameSlotForKeys()` method that previously was protected (#1497)
### Added
- Added Redis 7.4 `XREAD` and `HSCAN` interface changes (#1452)
- Added support for transactions for clustered connections (#1497)
### Fixed
- Fixed single persistent connection using the same resource (#1512)
## v3.0.0-alpha1 (2024-01-19)
Predis v3.0 introduces support for new communication protocol [RESP3](https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md) and [new features](README.md#resp3) based on it.
### Breaking Changes
- Refactored Relay integration (#1423)
- Changed interface of `CLIENT` command (#1337)
- Changed interfaces for commands to support Redis 6.2—7.0 arguments (#1330)
## v3.0.0 (2025-05-02)
### Added
- ⚠️ Added support for transactions for clustered connections (#1497)
- Added support for RESP3 communication protocol (#1047)
- Added support for [Push notifications](https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md#push-type) (#1316)
- Added support for RESP3 push notifications (#1316)
- Added support for Sharded Pub/Sub (#1303)
- Added support for `XGROUP` commands (#1324)
- Added support for `XREADGROUP` command (#1327)
- Added support for `XAUTOCLAIM` command (#1328)
- Added support for `XINFO` commands (#1331)
- Added support for Redis Gears triggered functions API (#1348)
- Added support for Redis 7.4 `XREAD` and `HSCAN` interface changes (#1452)
## v2.4.0-RC1 (2024-11-21)
### Changed
- ⚠️ Refactored Relay integration (#1423)
- ⚠️ Changed interface of `CLIENT` command (#1337)
- ⚠️ Changed interfaces for commands to support Redis 6.2 — 7.0 arguments (#1330)
- ⚠️ Changed default search `DIALECT` to `2` (#1516)
- ⚠️ Implemented PSR-7 compatible stream abstraction (#1450)
- ⚠️ Improved pipeline abstractions (#1438)
- ⚠️ Improved connection handshake (#1431)
### Fixed
- Fixed single persistent connection using the same resource (#1512)
## v2.4.0 (2025-04-30)
### Added
- Added new hash-field expiration commands (#1520)
- Added missing `FT._LIST` and `BITFIELD_RO` commands (#1521)
@@ -54,6 +38,7 @@ Predis v3.0 introduces support for new communication protocol [RESP3](https://gi
- Fixed PHP 8.4 compatibility with `stream_context_set_option()` (#1503)
- Prevent named arguments runtime failure (#1509)
- Mark `GEOSEARCH` as read-only to ensure execution on replica (#1481)
- Fixed protocol loss during redis cluster `MOVED` / `ASK` (#1530)
### Maintenance
- Added CI testing with Redis 8.0 (#1510)
+3 -1
View File
@@ -468,7 +468,7 @@ implementation of the standard connection classes available in the `Predis\Conne
## RESP3 ##
### Connection ###
To establish the connection using RESP3 protocol, you need to set parameter `protocol => 3`. Default protocol is still RESP2.
To establish the connection using the [RESP3](https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md) protocol, you need to set parameter `protocol => 3`. The default protocol is RESP2.
You can pass parameter as configuration option in array or as a query parameter in `redis_url`
@@ -506,6 +506,7 @@ $client = new \Predis\Client(['protocol' => 3]);
// RESP3 introduces new double type, that corresponds to PHP float.
var_dump($client->geopos('my_geo', ['member1']));
```
#### Aggregate types ####
In RESP3 new aggregate type [Map](https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md#map-type)
was introduced, that represents the sequence of field-value pairs. So it simplifies parsing, since we don't need to specify
@@ -514,6 +515,7 @@ parsing strategy per command (RESP2) and instead relies on the type defined by p
In most cases RESP2 responses shouldn't differ from RESP3, since we added additional parsing for those
command that return field-value pairs. However, since RESP2 requires additional parsing, it could be that some commands
had lack of it and return unhandled responses. In this case there would be difference like this:
```php
$client = new \Predis\Client();
+1 -1
View File
@@ -1 +1 @@
3.0.0-RC1
3.0.0
+1 -1
View File
@@ -54,7 +54,7 @@ use Traversable;
*/
class Client implements ClientInterface, IteratorAggregate
{
public const VERSION = '3.0.0-RC1';
public const VERSION = '3.0.0';
/** @var OptionsInterface */
private $options;
@@ -69,7 +69,7 @@ class TSINFO_Test extends PredisCommandTestCase
public function testReturnsInformationAboutGivenTimeSeries(): void
{
$redis = $this->getClient();
$expectedResponse = ['totalSamples', 0, 'memoryUsage', 4239, 'firstTimestamp', 0, 'lastTimestamp', 0,
$expectedResponse = ['totalSamples', 0, 'memoryUsage', 5000, 'firstTimestamp', 0, 'lastTimestamp', 0,
'retentionTime', 60000, 'chunkCount', 1, 'chunkSize', 4096, 'chunkType', 'compressed', 'duplicatePolicy',
'max', 'labels', [['sensor_id', '2'], ['area_id', '32']], 'sourceKey', null, 'rules', [],
'ignoreMaxTimeDiff', 0, 'ignoreMaxValDiff', 0];
@@ -84,7 +84,7 @@ class TSINFO_Test extends PredisCommandTestCase
$redis->tscreate('temperature:2:32', $arguments)
);
$this->assertEquals($expectedResponse, $redis->tsinfo('temperature:2:32'));
$this->assertEqualsWithDelta($expectedResponse, $redis->tsinfo('temperature:2:32'), 1000);
}
/**
@@ -97,7 +97,7 @@ class TSINFO_Test extends PredisCommandTestCase
public function testReturnsInformationAboutGivenTimeSeriesResp3(): void
{
$redis = $this->getResp3Client();
$expectedResponse = ['totalSamples' => 0, 'memoryUsage' => 4239, 'firstTimestamp' => 0, 'lastTimestamp' => 0,
$expectedResponse = ['totalSamples' => 0, 'memoryUsage' => 5000, 'firstTimestamp' => 0, 'lastTimestamp' => 0,
'retentionTime' => 60000, 'chunkCount' => 1, 'chunkSize' => 4096, 'chunkType' => 'compressed',
'duplicatePolicy' => 'max', 'labels' => ['sensor_id' => '2', 'area_id' => '32'], 'sourceKey' => null, 'rules' => [],
'ignoreMaxTimeDiff' => 0, 'ignoreMaxValDiff' => 0];
@@ -112,7 +112,7 @@ class TSINFO_Test extends PredisCommandTestCase
$redis->tscreate('temperature:2:32', $arguments)
);
$this->assertEquals($expectedResponse, $redis->tsinfo('temperature:2:32'));
$this->assertEqualsWithDelta($expectedResponse, $redis->tsinfo('temperature:2:32'), 1000);
}
public function argumentsProvider(): array