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 1/3] 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:: From af6dc34d4b9307ae9be2b9f84918ddf26ef2fa86 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 9 Jan 2018 11:59:35 +0100 Subject: [PATCH 2/3] Minor reword --- components/filesystem/lock_handler.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/filesystem/lock_handler.rst b/components/filesystem/lock_handler.rst index c0dc0ed6496..f4b73e624d8 100644 --- a/components/filesystem/lock_handler.rst +++ b/components/filesystem/lock_handler.rst @@ -3,10 +3,9 @@ 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. - + 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? --------------- From cb771c345a04786c568830f7ebbc2418c54dd0ec Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 9 Jan 2018 12:05:30 +0100 Subject: [PATCH 3/3] Reword --- console/lockable_trait.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/console/lockable_trait.rst b/console/lockable_trait.rst index 274587b4326..223aec1584b 100644 --- a/console/lockable_trait.rst +++ b/console/lockable_trait.rst @@ -5,10 +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 **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. +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:: @@ -40,3 +40,5 @@ that adds two convenient methods to lock and release commands:: $this->release(); } } + +.. _`locks`: https://en.wikipedia.org/wiki/Lock_(computer_science)