Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fd11a2

Browse files
committed
minor #8243 [Lock] Deprecate Filesystem/LockHandler (jderusse, javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- [Lock] Deprecate Filesystem/LockHandler This PR deprecate the Filesystem\LockHandler in favor of Lock\SemaphoreStore and Lock\FlockStore. see: symfony/symfony#23724 Commits ------- cb771c3 Reword af6dc34 Minor reword 800bdd7 Deprecate Filesystem/LockHandler
2 parents e89ffa0 + cb771c3 commit 7fd11a2

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

components/filesystem/lock_handler.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
LockHandler
22
===========
33

4+
.. versionadded:: 3.4
5+
6+
The ``LockHandler`` class was deprecated in Symfony 3.4 and it will be
7+
removed in Symfony 4.0. Use ``SemaphoreStore`` or ``FlockStore`` from the
8+
``Lock`` component instead.
9+
410
What is a Lock?
511
---------------
612

console/lockable_trait.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ Prevent Multiple Executions of a Console Command
55
The ``LockableTrait`` was introduced in Symfony 3.2.
66

77
A simple but effective way to prevent multiple executions of the same command in
8-
a single server is to use **file locks**. The Filesystem component provides a
9-
:doc:`LockHandler </components/filesystem/lock_handler>` class that eases the
10-
creation and release of these locks.
8+
a single server is to use `locks`_. The :doc:`Lock component </components/lock>`
9+
provides multiple classes to create locks based on the filesystem (:ref:`FlockStore <_lock-store-flock>`),
10+
shared memory (:ref:`SemaphoreStore <_lock-store-semaphore>`) and even databases
11+
and Redis servers.
1112

1213
In addition, the Console component provides a PHP trait called ``LockableTrait``
1314
that adds two convenient methods to lock and release commands::
@@ -39,3 +40,5 @@ that adds two convenient methods to lock and release commands::
3940
$this->release();
4041
}
4142
}
43+
44+
.. _`locks`: https://en.wikipedia.org/wiki/Lock_(computer_science)

0 commit comments

Comments
 (0)