Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 40fe161

Browse files
bug #32803 [Lock] let BlockingStoreInterface extend PersistingStoreInterface (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [Lock] let BlockingStoreInterface extend PersistingStoreInterface | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32555 (comment) | License | MIT | Doc PR | Commits ------- eaad40e let BlockingStoreInterface extend PersistingStoreInterface
2 parents 5824ab8 + eaad40e commit 40fe161

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Symfony/Component/Lock/BlockingStoreInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @author Hamza Amrouche <[email protected]>
1818
*/
19-
interface BlockingStoreInterface
19+
interface BlockingStoreInterface extends PersistingStoreInterface
2020
{
2121
/**
2222
* Waits until a key becomes free, then stores the resource.

src/Symfony/Component/Lock/Store/RetryTillSaveStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @author Jérémy Derussé <[email protected]>
2828
*/
29-
class RetryTillSaveStore implements PersistingStoreInterface, BlockingStoreInterface, StoreInterface, LoggerAwareInterface
29+
class RetryTillSaveStore implements BlockingStoreInterface, StoreInterface, LoggerAwareInterface
3030
{
3131
use LoggerAwareTrait;
3232

src/Symfony/Component/Lock/Tests/LockTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testAcquireReturnsFalseStoreInterface()
9797
public function testAcquireBlocking()
9898
{
9999
$key = new Key(uniqid(__METHOD__, true));
100-
$store = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
100+
$store = $this->createMock(BlockingStoreInterface::class);
101101
$lock = new Lock($key, $store);
102102

103103
$store
@@ -213,7 +213,7 @@ public function testReleaseStoreInterface()
213213
public function testReleaseOnDestruction()
214214
{
215215
$key = new Key(uniqid(__METHOD__, true));
216-
$store = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
216+
$store = $this->createMock(BlockingStoreInterface::class);
217217
$lock = new Lock($key, $store, 10);
218218

219219
$store
@@ -232,7 +232,7 @@ public function testReleaseOnDestruction()
232232
public function testNoAutoReleaseWhenNotConfigured()
233233
{
234234
$key = new Key(uniqid(__METHOD__, true));
235-
$store = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
235+
$store = $this->createMock(BlockingStoreInterface::class);
236236
$lock = new Lock($key, $store, 10, false);
237237

238238
$store

src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public function getStore()
6262
protected function setUp()
6363
{
6464
$this->strategy = $this->getMockBuilder(StrategyInterface::class)->getMock();
65-
$this->store1 = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
66-
$this->store2 = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
65+
$this->store1 = $this->createMock(BlockingStoreInterface::class);
66+
$this->store2 = $this->createMock(BlockingStoreInterface::class);
6767

6868
$this->store = new CombinedStore([$this->store1, $this->store2], $this->strategy);
6969
}

0 commit comments

Comments
 (0)