Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/filesystem/lock_handler.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
LockHandler
===========

.. versionadded:: 3.4

The ``LockHandler`` class has been deprecated in Symfony 3.4
and it will be removed in Symfony 4.0. Use ``SemaphoreStore`` or
``FlockStore`` from the ``Lock`` component instead.


What is a Lock?
---------------

Expand Down
7 changes: 4 additions & 3 deletions console/lockable_trait.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ Prevent Multiple Executions of a Console Command
The ``LockableTrait`` was introduced in Symfony 3.2.

A simple but effective way to prevent multiple executions of the same command in
a single server is to use **file locks**. The Filesystem component provides a
:doc:`LockHandler </components/filesystem/lock_handler>` class that eases the
creation and release of these locks.
a single server is to use **locks**. The Lock component provides a
:ref:`SemaphoreStore <_lock-store-semaphore>` class and a
:ref:`FlockStore <_lock-store-flock>` class that eases the creation and
release of these locks.

In addition, the Console component provides a PHP trait called ``LockableTrait``
that adds two convenient methods to lock and release commands::
Expand Down