Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 40fe161

Browse filesBrowse 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
Copy full SHA for 40fe161

File tree

4 files changed

+7
-7
lines changed
Filter options

4 files changed

+7
-7
lines changed

‎src/Symfony/Component/Lock/BlockingStoreInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/BlockingStoreInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @author Hamza Amrouche <hamza.simperfit@gmail.com>
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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/RetryTillSaveStore.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @author Jérémy Derussé <jeremy@derusse.com>
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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/LockTest.php
+3-3Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.