mirror of
https://github.com/predis/predis.git
synced 2026-08-19 11:12:00 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c5b60884e8 | |||
| 836ab07d40 | |||
| 2bfc8a9316 | |||
| d21576669d | |||
| 65fe24e346 |
+8
-2
@@ -1,5 +1,11 @@
|
||||
## Changelog
|
||||
|
||||
## v2.1.1 (2023-01-17)
|
||||
|
||||
## Bug Fixes
|
||||
- Fix `@template` in `Predis\Client` (#1017)
|
||||
- Fix support options array in `ZINTERSTORE` and `ZUNIONSTORE` (#1018)
|
||||
|
||||
## v2.1.0 (2023-01-16)
|
||||
|
||||
## New Features
|
||||
@@ -161,7 +167,7 @@
|
||||
|
||||
- Support Pub/Sub and Pipelines when using replication
|
||||
|
||||
- The class `Predis\Transaction\AbortedMultiExecException` now uses the correct
|
||||
- The class `Predis\Transaction\AbortedMultiExecException` now uses the correct
|
||||
default types for the `$code` (integer) parameter.
|
||||
|
||||
- __FIX__: using `strval` in `getScanOptions()` method, part of
|
||||
@@ -169,7 +175,7 @@
|
||||
string value of `$this->match` and not passing `null` to `strlen()` function.
|
||||
|
||||
- __FIX__: the value returned from `getArgument()` in `isReadOperation()` method,
|
||||
part of `Predis\Replication\ReplicationStrategy` class, is checked to not pass
|
||||
part of `Predis\Replication\ReplicationStrategy` class, is checked to not pass
|
||||
`null` to `sha1` function.
|
||||
|
||||
- __FIX__: the value returned from `getArgument()` in `parseResponse()`method,
|
||||
|
||||
+6
-7
@@ -9,16 +9,16 @@
|
||||
"issues": "https://github.com/predis/predis/issues"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Daniele Alessandri",
|
||||
"email": "suppakilla@gmail.com",
|
||||
"homepage": "http://clorophilla.net",
|
||||
"role": "Creator & Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Till Krüss",
|
||||
"homepage": "https://till.im",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Daniele Alessandri",
|
||||
"email": "suppakilla@gmail.com",
|
||||
"homepage": "http://clorophilla.net",
|
||||
"role": "Creator"
|
||||
}
|
||||
],
|
||||
"funding": [
|
||||
@@ -34,7 +34,6 @@
|
||||
"phpunit/phpunit": "^8.0 || ~9.4.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol",
|
||||
"ext-curl": "Allows access to Webdis when paired with phpiredis"
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
+3
-7
@@ -36,16 +36,13 @@ use Predis\Transaction\MultiExec as MultiExecTransaction;
|
||||
* abstractions are built. Internally it aggregates various other classes each
|
||||
* one with its own responsibility and scope.
|
||||
*
|
||||
* {@inheritdoc}
|
||||
* @template TKey
|
||||
* @template TValue
|
||||
* @template-implements Traversable<TKey, TValue>
|
||||
* @template-implements \IteratorAggregate<string, static>
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
class Client implements ClientInterface, \IteratorAggregate
|
||||
{
|
||||
const VERSION = '2.1.0';
|
||||
const VERSION = '2.1.1';
|
||||
|
||||
/** @var OptionsInterface */
|
||||
private $options;
|
||||
@@ -516,8 +513,7 @@ class Client implements ClientInterface, \IteratorAggregate
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return Traversable<TKey, TValue>|TValue[]
|
||||
* @return Traversable<string, static>
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
|
||||
@@ -50,6 +50,13 @@ class ZUNIONSTORE extends RedisCommand
|
||||
*/
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
// support old `$options` array for backwards compatibility
|
||||
if (! isset($arguments[3]) && (isset($arguments[2]['weights']) || isset($arguments[2]['aggregate']))) {
|
||||
$options = array_pop($arguments);
|
||||
array_push($arguments, $options['weights'] ?? []);
|
||||
array_push($arguments, $options['aggregate'] ?? 'sum');
|
||||
}
|
||||
|
||||
$this->setAggregate($arguments);
|
||||
$arguments = $this->getArguments();
|
||||
|
||||
|
||||
@@ -153,7 +153,14 @@ class ZINTERSTORE_Test extends PredisCommandTestCase
|
||||
'with all arguments' => [
|
||||
['destination', ['key1', 'key2'], [1, 2], 'min'],
|
||||
['destination', 2, 'key1', 'key2', 'WEIGHTS', 1, 2, 'AGGREGATE', 'MIN'],
|
||||
]
|
||||
],
|
||||
'with options array' => [
|
||||
['destination', ['key1', 'key2'], [
|
||||
'weights' => [1, 2],
|
||||
'aggregate' => 'min',
|
||||
]],
|
||||
['destination', 2, 'key1', 'key2', 'WEIGHTS', 1, 2, 'AGGREGATE', 'MIN'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,14 @@ class ZUNIONSTORE_Test extends PredisCommandTestCase
|
||||
'with all arguments' => [
|
||||
['destination', ['key1', 'key2'], [1, 2], 'min'],
|
||||
['destination', 2, 'key1', 'key2', 'WEIGHTS', 1, 2, 'AGGREGATE', 'MIN'],
|
||||
]
|
||||
],
|
||||
'with options array' => [
|
||||
['destination', ['key1', 'key2'], [
|
||||
'weights' => [1, 2],
|
||||
'aggregate' => 'min',
|
||||
]],
|
||||
['destination', 2, 'key1', 'key2', 'WEIGHTS', 1, 2, 'AGGREGATE', 'MIN'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user