Open
Description
Symfony version(s) affected
7.0.3
Description
The StoreFactory can receive object or string but the lock configuration allow use only string. StoreFactory::create can use instance of connection (\Redis, \RedisCluster, etc.)
public static function createStore(#[\SensitiveParameter] object|string $connection): PersistingStoreInterface
How to reproduce
framework:
lock:
enabled: true
resources:
- '@cache.provider.redis'
services:
cache.provider.redis:
class: \Redis # no matter what the factory returns
factory: [ 'Symfony\Component\Cache\Adapter\RedisAdapter', 'createConnection' ]
arguments:
- 'redis://redis:6379'
Possible Solution
\Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension::registerLockConfiguration
the extension should pass service here.
Additional Context
No response