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

[4.4] [Lock] Argument 1 passed to Symfony\Component\Lock\Factory::__construct() must be an instance of Symfony\Component\Lock\StoreInterface, instance of App\Lock\DatabaseStore given #34952

Copy link
Copy link
Closed
@JohJohan

Description

@JohJohan
Issue body actions

Symfony version(s) affected: 4.4+

Description
When creating a custom Lock Store that implements BlockingStoreInterface creating the lock will throw an exception:

argument 1 passed to Symfony\Component\Lock\Factory::__construct() must be an instance of Symfony\Component\Lock\StoreInterface, instance of App\Lock\DatabaseStore given.

Because Symfony\Component\Lock\LockFactory extends Symfony\Component\Lock\Factory which is deprecated and has a deprecated construct param for Symfony\Component\Lock\StoreInterface

How to reproduce

  1. Create a custom Lock Store that implements BlockingStoreInterface
  2. Create the lock using Symfony\Component\Lock\LockFactory you get an exception that you are not implementing Symfony\Component\Lock\StoreInterface

Possible Solution
Symfony\Component\Lock\LockFactory shouldn't extend Symfony\Component\Lock\Factory as this is deprecated.

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.