Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Symfony version(s) affected
7.3.0
Description
As per docs, lock resouce can be dsn or service id, but service id doesn't work. It is throwing "Unsupported Connection: shared.cache" error.
Here is my cache config.
<?phpdeclare(strict_types=1);namespaceSymfony\Component\DependencyInjection\Loader\Configurator;useSymfony\Config\FrameworkConfig;returnstaticfunction (ContainerConfigurator$containerConfigurator,FrameworkConfig$frameworkConfig):void {$cacheConfig =$frameworkConfig->cache();$cacheConfig ->defaultRedisProvider('%env(REDIS_URL)%') ->prefixSeed('qbil-trade.%kernel.environment%') ->app('cache.adapter.redis') ->system('cache.adapter.system');$cacheConfig ->pool('shared.cache') ->adapters(['cache.adapter.redis']);};
And here is my lock config
<?phpdeclare(strict_types=1);namespaceSymfony\Component\DependencyInjection\Loader\Configurator;useSymfony\Config\FrameworkConfig;returnstaticfunction (FrameworkConfig$frameworkConfig):void {$frameworkConfig ->lock() ->resource('default', ['%env(LOCK_DSN)%']);$frameworkConfig ->lock() ->resource('shared', ['shared.cache']);};
shared.cache
is service id (debug:container shows it too)
How to reproduce
Configure cache pools like the example above and use a pool as lock resource, it won't work.
Possible Solution
No response
Additional Context
No response