Skip to content

Lock table not create automatically #44369

Closed
@martinssipenko

Description

@martinssipenko

Symfony version(s) affected

5.4.0

Description

Symfony version 5.4.0 introduced a new Symfony\Component\Lock\Store\DoctrineDbalStore which should be used instead of Symfony\Component\Lock\Store\PdoStore. In contrast to PdoStore, the new DoctrineDbalStore no longer creates the lock table automatically in case it does not exist.

How to reproduce

$factory = new \Symfony\Component\Lock\LockFactory(
    new \Symfony\Component\Lock\Store\DoctrineDbalStore('doctrine_url'),
);

$lock = $factory->createLock('test-lock', 300, false);
$lock->acquire();

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