From 17d974123410fbc63199838304d0bdc9222faf43 Mon Sep 17 00:00:00 2001 From: Julien Falque Date: Wed, 28 Mar 2018 22:38:40 +0200 Subject: [PATCH] Fix documentation regarding createLock() method --- components/lock.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/lock.rst b/components/lock.rst index 66f20a89238..28738d21c6e 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -39,9 +39,10 @@ create the lock for some resource:: $store = new SemaphoreStore(); $factory = new Factory($store); -Then, a call to the :method:`Symfony\\Component\\Lock\\LockInterface::acquire` -method will try to acquire the lock. Its first argument is an arbitrary string -that represents the locked resource:: +The lock can be created by calling the :method:`Symfony\\Component\\Lock\\Factory::createLock` +method. Its first argument is an arbitrary string that represents the locked +resource. Then, a call to the :method:`Symfony\\Component\\Lock\\LockInterface::acquire` +method will try to acquire the lock:: // ... $lock = $factory->createLock('pdf-invoice-generation');