Skip to content

Commit

Permalink
bug #33033 [Lock] consistently throw NotSupportException (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] consistently throw NotSupportException

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

12b8c94 consistently throw NotSupportException
  • Loading branch information
nicolas-grekas committed Aug 8, 2019
2 parents 48859fd + 12b8c94 commit 854f5d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Lock/Store/CombinedStore.php
Expand Up @@ -94,7 +94,7 @@ public function save(Key $key)

public function waitAndSave(Key $key)
{
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this)));
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/Lock/Store/MemcachedStore.php
Expand Up @@ -13,6 +13,7 @@

use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Exception\NotSupportedException;
use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\StoreInterface;

Expand Down Expand Up @@ -70,7 +71,7 @@ public function save(Key $key)

public function waitAndSave(Key $key)
{
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this)));
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/Lock/Store/RedisStore.php
Expand Up @@ -14,6 +14,7 @@
use Symfony\Component\Cache\Traits\RedisProxy;
use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Exception\NotSupportedException;
use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\StoreInterface;

Expand Down Expand Up @@ -72,7 +73,7 @@ public function save(Key $key)

public function waitAndSave(Key $key)
{
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this)));
}

/**
Expand Down

0 comments on commit 854f5d1

Please sign in to comment.