8000 [Lock] rename and deprecate Factory into LockFactory · symfony/console@9de2218 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9de2218

Browse files
committed
[Lock] rename and deprecate Factory into LockFactory
1 parent 08fb59f commit 9de2218

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Command/LockableTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace Symfony\Component\Console\Command;
1313

1414
use Symfony\Component\Console\Exception\LogicException;
15-
use Symfony\Component\Lock\Factory;
1615
use Symfony\Component\Lock\Lock;
16+
use Symfony\Component\Lock\LockFactory;
1717
use Symfony\Component\Lock\Store\FlockStore;
1818
use Symfony\Component\Lock\Store\SemaphoreStore;
1919

@@ -48,7 +48,7 @@ private function lock($name = null, $blocking = false)
4848
$store = new FlockStore();
4949
}
5050

51-
$this->lock = (new Factory($store))->createLock($name ?: $this->getName());
51+
$this->lock = (new LockFactory($store))->createLock($name ?: $this->getName());
5252
if (!$this->lock->acquire($blocking)) {
5353
$this->lock = null;
5454

Tests/Command/LockableTraitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Console\Tester\CommandTester;
16-
use Symfony\Component\Lock\Factory;
16+
use Symfony\Component\Lock\LockFactory;
1717
use Symfony\Component\Lock\Store\FlockStore;
1818
use Symfony\Component\Lock\Store\SemaphoreStore;
1919

@@ -47,7 +47,7 @@ public function testLockReturnsFalseIfAlreadyLockedByAnotherCommand()
4747
$store = new FlockStore();
4848
}
4949

50-
$lock = (new Factory($store))->createLock($command->getName());
50+
$lock = (new LockFactory($store))->createLock($command->getName());
5151
$lock->acquire();
5252

5353
$tester = new CommandTester($command);

0 commit comments

Comments
 (0)
0