Relay::expire() throws an error when not setting $mode parameter.
Description
Method declaration is as follows:
public function expire(mixed $key, int $seconds, ?string $mode = null): Relay|bool {}
According to the above, it is correct to call the code:
$relay->zadd('test-key-1', 'member123', 123); $relay->expire('test-key-1', 300);
Expected Behavior
Success.
Actual Behavior
Running above example ends up getting the following error:
Relay\\Relay::expire(): Unknown expiration mode ''
Possible Fix
Probably you perform casting $mode parameter value to string.
Steps to Reproduce
As description states.
Additional context
Relay diagnostics
Relay Support => enabled
Relay Version => 0.8.0
Available cache => 16722880
Available serializers => php, json, igbinary, msgpack
Available compression => lzf, zstd, lz4
Binary UUID => d1417375-09c2-4dd4-a41e-de080c97c729
Git SHA =>
Allocator => relay
Build OS => Ubuntu 22.04.2 LTS
Architecture => x86_64
OpenSSL version => OpenSSL 3.0.2 15 Mar 2022
License state => unknown
License memory cap => 0
License request id =>
relay.enabled => true
relay.environment => development
relay.key =>
relay.maxmemory => 16777216
relay.maxmemory_pct => 95
relay.eviction_policy => noeviction
relay.eviction_sample_keys => 128
relay.initial_readers => 128
relay.invalidation_poll_usec => 5
relay.pconnect_default => 1
relay.max_endpoint_dbs => 32
relay.loglevel => none
relay.logfile =>
relay.session.compression => none
relay.session.compression_level => 0
relay.session.locking_enabled => 0
relay.session.lock_expire => 0
relay.session.lock_wait_time => 0
Environment
OS and version:
Ubunt Jammy
PHP version:
PHP 8.2.14
Redis version:
Redis version=7.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
Running mode=standalone, port=6379
Relay::expire() throws an error when not setting $mode parameter.
Description
Method declaration is as follows:
public function expire(mixed $key, int $seconds, ?string $mode = null): Relay|bool {}
According to the above, it is correct to call the code:$relay->zadd('test-key-1', 'member123', 123); $relay->expire('test-key-1', 300);
Expected Behavior
Success.
Actual Behavior
Running above example ends up getting the following error:
Relay\\Relay::expire(): Unknown expiration mode ''
Possible Fix
Probably you perform casting $mode parameter value to string.
Steps to Reproduce
As description states.
Additional context
Relay diagnostics
Environment