diff --git a/UPGRADE-5.2.md b/UPGRADE-5.2.md index ac5518d2ed3a5..0f0c4567ad1dc 100644 --- a/UPGRADE-5.2.md +++ b/UPGRADE-5.2.md @@ -16,6 +16,11 @@ FrameworkBundle used to be added by default to the seed, which is not the case anymore. This allows sharing caches between apps or different environments. +Lock +---- + + * `MongoDbStore` does not implement `BlockingStoreInterface` anymore, typehint against `PersistingStoreInterface` instead. + Mime ---- diff --git a/src/Symfony/Component/Lock/CHANGELOG.md b/src/Symfony/Component/Lock/CHANGELOG.md index 66a3acbb76fbb..8254caf78d697 100644 --- a/src/Symfony/Component/Lock/CHANGELOG.md +++ b/src/Symfony/Component/Lock/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +5.2.0 +----- + + * `MongoDbStore` does not implement `BlockingStoreInterface` anymore, typehint against `PersistingStoreInterface` instead. + 5.1.0 ----- diff --git a/src/Symfony/Component/Lock/Store/MongoDbStore.php b/src/Symfony/Component/Lock/Store/MongoDbStore.php index 5959c5c16b4c8..b228d2b7ace29 100644 --- a/src/Symfony/Component/Lock/Store/MongoDbStore.php +++ b/src/Symfony/Component/Lock/Store/MongoDbStore.php @@ -19,15 +19,14 @@ use MongoDB\Exception\DriverRuntimeException; use MongoDB\Exception\InvalidArgumentException as MongoInvalidArgumentException; use MongoDB\Exception\UnsupportedException; -use Symfony\Component\Lock\BlockingStoreInterface; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\InvalidTtlException; use Symfony\Component\Lock\Exception\LockAcquiringException; use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockExpiredException; use Symfony\Component\Lock\Exception\LockStorageException; -use Symfony\Component\Lock\Exception\NotSupportedException; use Symfony\Component\Lock\Key; +use Symfony\Component\Lock\PersistingStoreInterface; /** * MongoDbStore is a StoreInterface implementation using MongoDB as a storage @@ -46,7 +45,7 @@ * * @author Joe Bennett */ -class MongoDbStore implements BlockingStoreInterface +class MongoDbStore implements PersistingStoreInterface { private $collection; private $client; @@ -224,14 +223,6 @@ public function save(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ - public function waitAndSave(Key $key) - { - throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', __CLASS__)); - } - /** * {@inheritdoc} * diff --git a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php index a8472a5ed7757..cd6ab0a47b2a8 100644 --- a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php @@ -14,7 +14,6 @@ use MongoDB\Client; use MongoDB\Driver\Exception\ConnectionTimeoutException; use Symfony\Component\Lock\Exception\InvalidArgumentException; -use Symfony\Component\Lock\Exception\NotSupportedException; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\MongoDbStore; @@ -81,17 +80,6 @@ public function testCreateIndex() $this->assertContains('expires_at_1', $indexes); } - public function testNonBlocking() - { - $this->expectException(NotSupportedException::class); - - $store = $this->getStore(); - - $key = new Key(uniqid(__METHOD__, true)); - - $store->waitAndSave($key); - } - /** * @dataProvider provideConstructorArgs */ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy