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 5d21d9a

Browse filesBrowse files
committed
remove supports methods
1 parent 7af9daa commit 5d21d9a
Copy full SHA for 5d21d9a

File tree

7 files changed

+1
-42
lines changed
Filter options

7 files changed

+1
-42
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/BlockingStoreInterface.php
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,4 @@ interface BlockingStoreInterface
2424
* @throws LockConflictedException
2525
*/
2626
public function waitAndSave(Key $key);
27-
28-
/**
29-
* Checks if the store can wait until a key becomes free before storing the resource.
30-
*/
31-
public function supportsWaitAndSave(): bool;
3227
}

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Lock.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function acquire($blocking = false)
7171
{
7272
try {
7373
if ($blocking) {
74-
if (!$this->store instanceof StoreInterface && !($this->store instanceof BlockingStoreInterface && $this->store->supportsWaitAndSave())) {
74+
if (!$this->store instanceof StoreInterface && !$this->store instanceof BlockingStoreInterface) {
7575
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this->store)));
7676
}
7777
$this->store->waitAndSave($this->key);

‎src/Symfony/Component/Lock/Store/CombinedStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/CombinedStore.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,4 @@ public function exists(Key $key)
188188

189189
return false;
190190
}
191-
192-
/**
193-
* {@inheritdoc}
194-
*/
195-
public function supportsWaitAndSave(): bool
196-
{
197-
return false;
198-
}
199191
}

‎src/Symfony/Component/Lock/Store/FlockStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/FlockStore.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ public function waitAndSave(Key $key)
6565
$this->lock($key, true);
6666
}
6767

68-
/**
69-
* {@inheritdoc}
70-
*/
71-
public function supportsWaitAndSave(): bool
72-
{
73-
return true;
74-
}
75-
7668
private function lock(Key $key, $blocking)
7769
{
7870
// The lock is maybe already acquired.

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/RetryTillSaveStore.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,4 @@ public function exists(Key $key)
101101
{
102102
return $this->decorated->exists($key);
103103
}
104-
105-
/**
106-
* {@inheritdoc}
107-
*/
108-
public function supportsWaitAndSave(): bool
109-
{
110-
return true;
111-
}
112104
}

‎src/Symfony/Component/Lock/Store/SemaphoreStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/SemaphoreStore.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,4 @@ public function exists(Key $key)
113113
{
114114
return $key->hasState(__CLASS__);
115115
}
116-
117-
/**
118-
* {@inheritdoc}
119-
*/
120-
public function supportsWaitAndSave(): bool
121-
{
122-
return true;
123-
}
124116
}

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/LockTest.php
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ public function testAcquireBlocking()
100100
$key = new Key(uniqid(__METHOD__, true));
101101
$store = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
102102
$lock = new Lock($key, $store);
103-
$store
104-
->expects($this->once())
105-
->method('supportsWaitAndSave')
106-
->willReturn(true);
107103

108104
$store
109105
->expects($this->never())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.