From 800bdd7abc085e8fd882eade8ef59cfba1020f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 31 Jul 2017 09:49:57 +0200 Subject: [PATCH] Deprecate Filesystem/LockHandler --- components/filesystem/lock_handler.rst | 7 +++++++ console/lockable_trait.rst | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/components/filesystem/lock_handler.rst b/components/filesystem/lock_handler.rst index 3c2e7ce3b77..c0dc0ed6496 100644 --- a/components/filesystem/lock_handler.rst +++ b/components/filesystem/lock_handler.rst @@ -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? --------------- diff --git a/console/lockable_trait.rst b/console/lockable_trait.rst index fbdac719e57..274587b4326 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 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::