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
Expand file treeCollapse file tree

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
}

0 commit comments

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