Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Closed
Description
Symfony version(s) affected
7.1.2
Description
I'm trying to flush doctrine metadata using Redis adapter with Valkey 8.0.
TheRedisTrait sends the following query to Valkey:SCAN NULL on the first loop iteration, which leads to errorERR invalid cursor.
Shouldn't the cursor variable initialized to value0?
I've patched the file with$cursor = 0; instead, andbin/console doctrine:cache:clear-metadata works as expected.
How to reproduce
I'm using the following configuration:
doctrine:orm:metadata_cache_driver:type:poolpool:doctrine_redisframework:cache:pools:doctrine_redis:adapter:cache.adapter.redisprovider:snc_redis.doctrine_metadata_cachesnc_redis:clients:doctrine_metadata_cache:type:predisalias:doctrine_metadata_cachedsn:"%env(REDIS_URL)%/3"options:connection_timeout:10read_write_timeout:30
And runbin/console doctrine:cache:clear-metadata to get the error.
You can also use directlyvalkey-cli SCAN NULL
Possible Solution
Initialize the cursor variable with 0.
Additional Context
No response