Skip to content

Commit

Permalink
feature #54084 [Lock] Make NoLock implement the SharedLockInterface (…
Browse files Browse the repository at this point in the history
…mbabker)

This PR was merged into the 7.1 branch.

Discussion
----------

[Lock] Make NoLock implement the SharedLockInterface

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | Fix #53713
| License       | MIT

This PR updates the `Symfony\Component\Lock\NoLock` stub to implement `Symfony\Component\Lock\SharedLockInterface` and returns it to being compatible with the `Symfony\Component\Lock\LockFactory` return types.

Commits
-------

22600d0 Make NoLock implement the SharedLockInterface
  • Loading branch information
nicolas-grekas committed Feb 27, 2024
2 parents cf5b5c1 + 22600d0 commit 9e810de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Symfony/Component/Lock/NoLock.php
Expand Up @@ -19,8 +19,13 @@
*
* @author Wouter de Jong <wouter@wouterj.nl>
*/
final class NoLock implements LockInterface
final class NoLock implements SharedLockInterface
{
public function acquireRead(bool $blocking = false): bool
{
return true;
}

public function acquire(bool $blocking = false): bool
{
return true;
Expand Down

0 comments on commit 9e810de

Please sign in to comment.