mirror of
https://github.com/predis/predis.git
synced 2026-09-12 11:27:05 +00:00
Correct pack/unpack PHPDoc types, clean up UNLINK test typing (#1689)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
### Fixed
|
||||
- Allow `UNLINK` to accept an array of keys (#1687)
|
||||
- Fixed `Client::(un)pack()` return types
|
||||
|
||||
## v3.5.0 (2026-06-02)
|
||||
### Added
|
||||
|
||||
+2
-2
@@ -273,7 +273,7 @@ class Client implements ClientInterface, IteratorAggregate
|
||||
* Applies the configured serializer and compression to given value.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @return string
|
||||
* @return mixed
|
||||
*/
|
||||
public function pack($value)
|
||||
{
|
||||
@@ -286,7 +286,7 @@ class Client implements ClientInterface, IteratorAggregate
|
||||
* Deserializes and decompresses to given value.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @return string
|
||||
* @return mixed
|
||||
*/
|
||||
public function unpack($value)
|
||||
{
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
namespace Predis\Command\Redis;
|
||||
|
||||
use Predis\Command\PrefixableCommand;
|
||||
|
||||
/**
|
||||
* @group commands
|
||||
* @group realm-key
|
||||
@@ -78,13 +76,13 @@ class UNLINK_Test extends PredisCommandTestCase
|
||||
*/
|
||||
public function testPrefixKeys(): void
|
||||
{
|
||||
/** @var PrefixableCommand $command */
|
||||
/** @var \Predis\Command\Redis\UNLINK $command */
|
||||
$command = $this->getCommand();
|
||||
$actualArguments = ['arg1', 'arg2', 'arg3', 'arg4'];
|
||||
$inputArguments = ['arg1', 'arg2', 'arg3', 'arg4'];
|
||||
$prefix = 'prefix:';
|
||||
$expectedArguments = ['prefix:arg1', 'prefix:arg2', 'prefix:arg3', 'prefix:arg4'];
|
||||
|
||||
$command->setArguments($actualArguments);
|
||||
$command->setArguments($inputArguments);
|
||||
$command->prefixKeys($prefix);
|
||||
|
||||
$this->assertSame($expectedArguments, $command->getArguments());
|
||||
|
||||
Reference in New Issue
Block a user