diff --git a/components/filesystem/lock_handler.rst b/components/filesystem/lock_handler.rst index 3c2e7ce3b77..f4b73e624d8 100644 --- a/components/filesystem/lock_handler.rst +++ b/components/filesystem/lock_handler.rst @@ -1,6 +1,12 @@ LockHandler =========== +.. versionadded:: 3.4 + + The ``LockHandler`` class was 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? --------------- diff --git a/console/lockable_trait.rst b/console/lockable_trait.rst index fbdac719e57..223aec1584b 100644 --- a/console/lockable_trait.rst +++ b/console/lockable_trait.rst @@ -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 ` class that eases the -creation and release of these locks. +a single server is to use `locks`_. The :doc:`Lock component ` +provides multiple classes to create locks based on the filesystem (:ref:`FlockStore <_lock-store-flock>`), +shared memory (:ref:`SemaphoreStore <_lock-store-semaphore>`) and even databases +and Redis servers. In addition, the Console component provides a PHP trait called ``LockableTrait`` that adds two convenient methods to lock and release commands:: @@ -39,3 +40,5 @@ that adds two convenient methods to lock and release commands:: $this->release(); } } + +.. _`locks`: https://en.wikipedia.org/wiki/Lock_(computer_science)