mirror of
https://github.com/predis/predis.git
synced 2026-09-05 15:42:31 +00:00
Added EXPIRETIME command to KeyPrefixProcessor (#1369)
* Added EXPIRETIME command to KeyPrefixProcessor * Fixed test responses for Redis 7.2 * Marked test as relay-incompatible
This commit is contained in:
committed by
GitHub
parent
912af82bfd
commit
16bdd83d23
@@ -190,6 +190,9 @@ class KeyPrefixProcessor implements ProcessorInterface
|
||||
/* ---------------- Redis 6.2 ---------------- */
|
||||
'GETDEL' => $prefixFirst,
|
||||
|
||||
/* ---------------- Redis 7.0 ---------------- */
|
||||
'EXPIRETIME' => $prefixFirst,
|
||||
|
||||
/* RedisJSON */
|
||||
'JSON.ARRAPPEND' => $prefixFirst,
|
||||
'JSON.ARRINDEX' => $prefixFirst,
|
||||
|
||||
@@ -1255,6 +1255,7 @@ class ClientTest extends PredisTestCase
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @group relay-incompatible
|
||||
* @requiresRedisVersion >= 7.2.0
|
||||
*/
|
||||
public function testSetClientInfoOnConnection(): void
|
||||
|
||||
@@ -978,6 +978,11 @@ class KeyPrefixProcessorTest extends PredisTestCase
|
||||
['key'],
|
||||
['prefix:key'],
|
||||
],
|
||||
/* ---------------- Redis 7.0 ---------------- */
|
||||
['EXPIRETIME',
|
||||
['key'],
|
||||
['prefix:key'],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class ACL_Test extends PredisCommandTestCase
|
||||
$redis->acl->dryRun('Test', 'SET', 'foo', 'bar')
|
||||
);
|
||||
$this->assertEquals(
|
||||
"This user has no permissions to run the 'get' command",
|
||||
"User Test has no permissions to run the 'get' command",
|
||||
$redis->acl->dryRun('Test', 'GET', 'foo')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class OBJECT_Test extends PredisCommandTestCase
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @requiresRedisVersion >= 2.2.3
|
||||
* @requiresRedisVersion < 7.2.0
|
||||
*/
|
||||
public function testObjectEncoding(): void
|
||||
{
|
||||
@@ -92,6 +92,19 @@ class OBJECT_Test extends PredisCommandTestCase
|
||||
$this->assertMatchesRegularExpression('/[zip|quick]list/', $redis->object('ENCODING', 'list:metavars'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @requiresRedisVersion >= 7.2.0
|
||||
*/
|
||||
public function testObjectEncodingReturnsUpdatedResponse(): void
|
||||
{
|
||||
$redis = $this->getClient();
|
||||
|
||||
$redis->lpush('list:metavars', 'foo', 'bar');
|
||||
|
||||
$this->assertSame('listpack', $redis->object('ENCODING', 'list:metavars'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @requiresRedisVersion >= 2.2.3
|
||||
|
||||
Reference in New Issue
Block a user