@@ -237,7 +237,7 @@ private function evaluate(string $script, string $resource, array $args): mixed
237
237
if (null !== ($ err = $ this ->redis ->getLastError ()) && self ::NO_SCRIPT_ERROR_MESSAGE === $ err ) {
238
238
$ this ->redis ->clearLastError ();
239
239
240
- $ this ->redis ->rawCommand ( ' SCRIPT ' , 'LOAD ' , $ script );
240
+ $ this ->redis ->script ( 'LOAD ' , $ script );
241
241
242
242
if (null !== ($ err = $ this ->redis ->getLastError ())) {
243
243
throw new LockStorageException ($ err );
@@ -260,7 +260,7 @@ private function evaluate(string $script, string $resource, array $args): mixed
260
260
if (null !== ($ err = $ client ->getLastError ()) && self ::NO_SCRIPT_ERROR_MESSAGE === $ err ) {
261
261
$ client ->clearLastError ();
262
262
263
- $ client ->rawCommand ( ' SCRIPT ' , 'LOAD ' , $ script );
263
+ $ client ->script ( 'LOAD ' , $ script );
264
264
265
265
if (null !== ($ err = $ client ->getLastError ())) {
266
266
throw new LockStorageException ($ err );
@@ -288,8 +288,7 @@ private function evaluate(string $script, string $resource, array $args): mixed
288
288
}
289
289
290
290
try {
291
- $ loadScriptCommand = $ this ->redis ->createCommand ('SCRIPT ' , ['LOAD ' , $ script ]);
292
- $ this ->redis ->executeCommand ($ loadScriptCommand );
291
+ $ this ->redis ->script ('LOAD ' , $ script );
293
292
} catch (ServerException $ e ) {
294
293
throw new LockStorageException ($ e ->getMessage (), $ e ->getCode (), $ e );
295
294
}
0 commit comments