mirror of
https://github.com/predis/predis.git
synced 2026-08-17 19:33:44 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c996db191 | |||
| fc345603a4 | |||
| 98180048d0 |
@@ -1,5 +1,12 @@
|
||||
## Changelog
|
||||
|
||||
## v3.5.1 (2026-06-11)
|
||||
### Added
|
||||
- Expose `pipeline()` API via `ClientInterface` (#1686)
|
||||
|
||||
### Fixed
|
||||
- Allow `UNLINK` to accept an array of keys (#1687)
|
||||
|
||||
## v3.5.0 (2026-06-02)
|
||||
### Added
|
||||
- Added support for `XNACK` command (#1666)
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ use Traversable;
|
||||
*/
|
||||
class Client implements ClientInterface, IteratorAggregate
|
||||
{
|
||||
public const VERSION = '3.5.0';
|
||||
public const VERSION = '3.5.1';
|
||||
|
||||
/** @var OptionsInterface */
|
||||
private $options;
|
||||
|
||||
@@ -77,7 +77,7 @@ use Predis\Command\Redis\VADD;
|
||||
* @method $this sort_ro(string $key, ?string $byPattern = null, ?LimitOffsetCount $limit = null, array $getPatterns = [], ?string $sorting = null, bool $alpha = false)
|
||||
* @method $this ttl($key)
|
||||
* @method $this type($key)
|
||||
* @method $this unlink(string ...$keys)
|
||||
* @method $this unlink(string[]|string $keyOrKeys, string ...$keys = null)
|
||||
* @method $this append($key, $value)
|
||||
* @method $this arcount(string $key)
|
||||
* @method $this ardel(string $key, int ...$index)
|
||||
|
||||
@@ -53,6 +53,7 @@ use Predis\Command\Redis\HSETEX;
|
||||
use Predis\Command\Redis\VADD;
|
||||
use Predis\Configuration\OptionsInterface;
|
||||
use Predis\Connection\ConnectionInterface;
|
||||
use Predis\Pipeline\Pipeline;
|
||||
use Predis\Response\Status;
|
||||
|
||||
/**
|
||||
@@ -87,7 +88,7 @@ use Predis\Response\Status;
|
||||
* @method array sort_ro(string $key, ?string $byPattern = null, ?LimitOffsetCount $limit = null, array $getPatterns = [], ?string $sorting = null, bool $alpha = false)
|
||||
* @method int ttl(string $key)
|
||||
* @method mixed type(string $key)
|
||||
* @method int unlink(string ...$keys)
|
||||
* @method int unlink(string[]|string $keyOrKeys, string ...$keys = null)
|
||||
* @method int append(string $key, $value)
|
||||
* @method int arcount(string $key)
|
||||
* @method int ardel(string $key, int ...$index)
|
||||
@@ -381,6 +382,7 @@ use Predis\Response\Status;
|
||||
* @method mixed discard()
|
||||
* @method array|null exec()
|
||||
* @method mixed multi()
|
||||
* @method Pipeline|array pipeline(mixed ...$arguments)
|
||||
* @method mixed unwatch()
|
||||
* @method array unsubscribe(string ...$channels)
|
||||
* @method bool vadd(string $key, string|array $vector, string $elem, int $dim = null, bool $cas = false, string $quant = VADD::QUANT_DEFAULT, int $bef = null, string|array $attributes = null, int $numlinks = null)
|
||||
|
||||
@@ -27,6 +27,16 @@ class UNLINK extends RedisCommand
|
||||
return 'UNLINK';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
$arguments = self::normalizeArguments($arguments);
|
||||
|
||||
parent::setArguments($arguments);
|
||||
}
|
||||
|
||||
public function prefixKeys($prefix)
|
||||
{
|
||||
$this->applyPrefixForAllArguments($prefix);
|
||||
|
||||
@@ -49,6 +49,20 @@ class UNLINK_Test extends PredisCommandTestCase
|
||||
$this->assertSame($expected, $command->getArguments());
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testFilterArgumentsAsSingleArray(): void
|
||||
{
|
||||
$arguments = [['key1', 'key2', 'key3']];
|
||||
$expected = ['key1', 'key2', 'key3'];
|
||||
|
||||
$command = $this->getCommand();
|
||||
$command->setArguments($arguments);
|
||||
|
||||
$this->assertSame($expected, $command->getArguments());
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user