Correct pack/unpack PHPDoc types, clean up UNLINK test typing (#1689)

This commit is contained in:
Copilot
2026-06-15 10:32:18 -07:00
committed by GitHub
parent a43cfd723c
commit d55b3072fa
3 changed files with 6 additions and 7 deletions
+1
View File
@@ -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
View File
@@ -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)
{
+3 -5
View File
@@ -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());