Skip to content

Commit e67c2a1

Browse files
Use 'script' instead of 'rawCommand'
1 parent 7bac119 commit e67c2a1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Symfony/Component/Lock/Store/RedisStore.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function evaluate(string $script, string $resource, array $args): mixed
237237
if (null !== ($err = $this->redis->getLastError()) && self::NO_SCRIPT_ERROR_MESSAGE === $err) {
238238
$this->redis->clearLastError();
239239

240-
$this->redis->rawCommand('SCRIPT', 'LOAD', $script);
240+
$this->redis->script('LOAD', $script);
241241

242242
if (null !== ($err = $this->redis->getLastError())) {
243243
throw new LockStorageException($err);
@@ -260,7 +260,7 @@ private function evaluate(string $script, string $resource, array $args): mixed
260260
if (null !== ($err = $client->getLastError()) && self::NO_SCRIPT_ERROR_MESSAGE === $err) {
261261
$client->clearLastError();
262262

263-
$client->rawCommand('SCRIPT', 'LOAD', $script);
263+
$client->script('LOAD', $script);
264264

265265
if (null !== ($err = $client->getLastError())) {
266266
throw new LockStorageException($err);
@@ -288,8 +288,7 @@ private function evaluate(string $script, string $resource, array $args): mixed
288288
}
289289

290290
try {
291-
$loadScriptCommand = $this->redis->createCommand('SCRIPT', ['LOAD', $script]);
292-
$this->redis->executeCommand($loadScriptCommand);
291+
$this->redis->script('LOAD', $script);
293292
} catch (ServerException $e) {
294293
throw new LockStorageException($e->getMessage(), $e->getCode(), $e);
295294
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy