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 c33c396

Browse filesBrowse files
committed
bug #32299 [Lock] Stores must implement putOffExpiration (jderusse)
This PR was merged into the 4.2 branch. Discussion ---------- [Lock] Stores must implement `putOffExpiration` | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | / | License | MIT | Doc PR | / Following #32198 (review) every stores MUST implement the method `putOffExpiration` either by ignoring the arguments (by design they lock forever) or using a mechanism to define the expiration. It was a mistake to add the dockblock `@throws NotSupportedException` tell me if it's a BC break, I'll create a dedicated PR for it. Commits ------- c986c86 [Lock] Stores must implement `putOffExpiration`
2 parents 34c50c0 + c986c86 commit c33c396
Copy full SHA for c33c396

File tree

Expand file treeCollapse file tree

2 files changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+1
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/ZookeeperStore.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function waitAndSave(Key $key)
9191
*/
9292
public function putOffExpiration(Key $key, $ttl)
9393
{
94-
throw new NotSupportedException();
94+
// do nothing, zookeeper locks forever.
9595
}
9696

9797
/**

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/StoreInterface.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function waitAndSave(Key $key);
4949
* @param float $ttl amount of seconds to keep the lock in the store
5050
*
5151
* @throws LockConflictedException
52-
* @throws NotSupportedException
5352
*/
5453
public function putOffExpiration(Key $key, $ttl);
5554

0 commit comments

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