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 b77e770

Browse filesBrowse files
committed
remove supports methods
1 parent f62d205 commit b77e770
Copy full SHA for b77e770

17 files changed

+19
-60
lines changed

‎UPGRADE-4.4.md

Copy file name to clipboardExpand all lines: UPGRADE-4.4.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Lock
9999
----
100100

101101
* Deprecated `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
102-
`Symfony\Component\Lock\PersistStoreInterface`.
102+
`Symfony\Component\Lock\PersistingStoreInterface`.
103103
* `Factory` is deprecated, use `LockFactory` instead
104104

105105
Messenger

‎UPGRADE-5.0.md

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Lock
306306
----
307307

308308
* Removed `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
309-
`Symfony\Component\Lock\PersistStoreInterface`.
309+
`Symfony\Component\Lock\PersistingStoreInterface`.
310310
* Removed `Factory`, use `LockFactory` instead
311311

312312
Messenger

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
16061606
$container->setDefinition($connectionDefinitionId, $connectionDefinition);
16071607
}
16081608

1609-
$storeDefinition = new Definition(PersistStoreInterface::class);
1609+
$storeDefinition = new Definition(PersistingStoreInterface::class);
16101610
$storeDefinition->setPublic(false);
16111611
$storeDefinition->setFactory([StoreFactory::class, 'createStore']);
16121612
$storeDefinition->setArguments([new Reference($connectionDefinitionId)]);

‎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
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ public function save(Key $key)
9696
/**
9797
* {@inheritdoc}
9898
*
99-
* @deprecated since Symfony 4.4 and will be removed in 5.0.
99+
* @deprecated since Symfony 4.4.
100100
*/
101101
public function waitAndSave(Key $key)
102102
{
103-
@trigger_error(sprintf('%s() has been deprecated since Symfony 4.4 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
103+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
104104
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
105105
}
106106

@@ -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/MemcachedStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/MemcachedStore.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ public function save(Key $key)
7272
/**
7373
* {@inheritdoc}
7474
*
75-
* @deprecated since Symfony 4.4 and will be removed in 5.0.
75+
* @deprecated since Symfony 4.4.
7676
*/
7777
public function waitAndSave(Key $key)
7878
{
79-
@trigger_error(sprintf('%s() has been deprecated since Symfony 4.4 and will be removed in 5.0.', __METHOD__));
79+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
8080
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
8181
}
8282

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/RedisStore.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ public function save(Key $key)
7575
/**
7676
* {@inheritdoc}
7777
*
78-
* @deprecated since Symfony 4.4 and will be removed in 5.0.
78+
* @deprecated since Symfony 4.4.
7979
*/
8080
public function waitAndSave(Key $key)
8181
{
82-
@trigger_error(sprintf('%s() has been deprecated since Symfony 4.4 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
82+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
8383
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
8484
}
8585

‎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/Store/ZookeeperStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/ZookeeperStore.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ public function exists(Key $key): bool
8585
/**
8686
* {@inheritdoc}
8787
*
88-
* @deprecated since Symfony 4.4 and will be removed in 5.0.
88+
* @deprecated since Symfony 4.4.
8989
*/
9090
public function waitAndSave(Key $key)
9191
{
92-
@trigger_error(sprintf('%s() has been deprecated since Symfony 4.4 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
92+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
9393
throw new NotSupportedException();
9494
}
9595

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/StoreInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @author Jérémy Derussé <jeremy@derusse.com>
2121
*
22-
* @deprecated "Symfony\Component\Lock\StoreInterface" is deprecated since Symfony 4.4 and has been split into "Symfony\Component\Lock\PersistingStoreInterface", "Symfony\Component\Lock\BlockingStoreInterface".'
22+
* @deprecated since Symfony 4.4, use PersistingStoreInterface and BlockingStoreInterface instead
2323
*/
2424
interface StoreInterface extends PersistingStoreInterface
2525
{

‎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
@@ -99,10 +99,6 @@ public function testAcquireBlocking()
9999
$key = new Key(uniqid(__METHOD__, true));
100100
$store = $this->getMockBuilder([PersistingStoreInterface::class, BlockingStoreInterface::class])->getMock();
101101
$lock = new Lock($key, $store);
102-
$store
103-
->expects($this->once())
104-
->method('supportsWaitAndSave')
105-
->willReturn(true);
106102

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

‎src/Symfony/Component/Lock/Tests/Store/AbstractStoreTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/AbstractStoreTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Lock\Exception\LockConflictedException;
1616
use Symfony\Component\Lock\Key;
17-
use Symfony\Component\Lock\PersistStoreInterface;
17+
use Symfony\Component\Lock\PersistingStoreInterface;
1818

1919
/**
2020
* @author Jérémy Derussé <jeremy@derusse.com>
2121
*/
2222
abstract class AbstractStoreTest extends TestCase
2323
{
2424
/**
25-
* @return PersistStoreInterface
25+
* @return PersistingStoreInterface
2626
*/
2727
abstract protected function getStore();
2828

‎src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Lock\Exception\LockConflictedException;
1515
use Symfony\Component\Lock\Exception\NotSupportedException;
1616
use Symfony\Component\Lock\Key;
17-
use Symfony\Component\Lock\PersistStoreInterface;
17+
use Symfony\Component\Lock\PersistingStoreInterface;
1818

1919
/**
2020
* @author Jérémy Derussé <jeremy@derusse.com>
@@ -24,7 +24,7 @@ trait BlockingStoreTestTrait
2424
/**
2525
* @see AbstractStoreTest::getStore()
2626
*
27-
* @return PersistStoreInterface
27+
* @return PersistingStoreInterface
2828
*/
2929
abstract protected function getStore();
3030

‎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
@@ -267,8 +267,8 @@ public function testputOffExpirationAbortWhenStrategyCantBeMet()
267267

268268
public function testPutOffExpirationIgnoreNonExpiringStorage()
269269
{
270-
$store1 = $this->getMockBuilder(PersistStoreInterface::class)->getMock();
271-
$store2 = $this->getMockBuilder(PersistStoreInterface::class)->getMock();
270+
$store1 = $this->getMockBuilder(PersistingStoreInterface::class)->getMock();
271+
$store2 = $this->getMockBuilder(PersistingStoreInterface::class)->getMock();
272272

273273
$store = new CombinedStore([$store1, $store2], $this->strategy);
274274

0 commit comments

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