Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Lock] - pass redis connection #53845

Copy link
Copy link
Open
@vencakrecl

Description

@vencakrecl
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.