10000 [Lock] Renamed the Lock factory class · symfony/symfony-docs@19ec891 · GitHub
[go: up one dir, main page]

Skip to content

Commit 19ec891

Browse files
committed
[Lock] Renamed the Lock factory class
1 parent f7fa0d1 commit 19ec891

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/lock.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ not executed more than once at the same time (on the same or different servers).
2727
Locks are created using a :class:`Symfony\\Component\\Lock\\Factory` class,
2828
which in turn requires another class to manage the storage of locks::
2929

30-
use Symfony\Component\Lock\Factory;
30+
use Symfony\Component\Lock\LockFactory;
3131
use Symfony\Component\Lock\Store\SemaphoreStore;
3232

3333
$store = new SemaphoreStore();
3434
$factory = new Factory($store);
3535

36+
.. versionadded:: 4.4
37+
38+
The ``Symfony\Component\Lock\LockFactory`` class was introduced in Symfony
39+
4.4. In previous versions it was called ``Symfony\Component\Lock\Factory``.
40+
3641
The lock is created by calling the :method:`Symfony\\Component\\Lock\\Factory::createLock`
3742
method. Its first argument is an arbitrary string that represents the locked
3843
resource. Then, a call to the :method:`Symfony\\Component\\Lock\\LockInterface::acquire`
@@ -77,7 +82,7 @@ until the lock is acquired.
7782
Some of the built-in ``Store`` classes support this feature. When they don't,
7883
they can be decorated with the ``RetryTillSaveStore`` class::
7984

80-
use Symfony\Component\Lock\Factory;
85+
use Symfony\Component\Lock\LockFactory;
8186
use Symfony\Component\Lock\Store\RedisStore;
8287
use Symfony\Component\Lock\Store\RetryTillSaveStore;
8388

0 commit comments

Comments
 (0)
0