File tree Expand file tree Collapse file tree 4 files changed +13
-23
lines changed
src/Symfony/Component/Lock Expand file tree Collapse file tree 4 files changed +13
-23
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ FrameworkBundle
16
16
used to be added by default to the seed, which is not the case anymore. This allows sharing caches between
17
17
apps or different environments.
18
18
19
+ Lock
20
+ ----
21
+
22
+ * ` MongoDbStore ` does not implement ` BlockingStoreInterface ` anymore, typehint against ` PersistingStoreInterface ` instead.
23
+
24
+
19
25
Mime
20
26
----
21
27
Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=========
3
3
4
+ 5.2.0
5
+ -----
6
+
7
+ * ` MongoDbStore ` does not implement ` BlockingStoreInterface ` anymore, typehint against ` PersistingStoreInterface ` instead.
8
+
4
9
5.1.0
5
10
-----
6
11
Original file line number Diff line number Diff line change 19
19
use MongoDB \Exception \DriverRuntimeException ;
20
20
use MongoDB \Exception \InvalidArgumentException as MongoInvalidArgumentException ;
21
21
use MongoDB \Exception \UnsupportedException ;
22
- use Symfony \Component \Lock \BlockingStoreInterface ;
23
22
use Symfony \Component \Lock \Exception \InvalidArgumentException ;
24
23
use Symfony \Component \Lock \Exception \InvalidTtlException ;
25
24
use Symfony \Component \Lock \Exception \LockAcquiringException ;
26
25
use Symfony \Component \Lock \Exception \LockConflictedException ;
27
26
use Symfony \Component \Lock \Exception \LockExpiredException ;
28
27
use Symfony \Component \Lock \Exception \LockStorageException ;
29
- use Symfony \Component \Lock \Exception \NotSupportedException ;
30
28
use Symfony \Component \Lock \Key ;
29
+ use Symfony \Component \Lock \PersistingStoreInterface ;
31
30
32
31
/**
33
32
* MongoDbStore is a StoreInterface implementation using MongoDB as a storage
46
45
*
47
46
* @author Joe Bennett <joe@assimtech.com>
48
47
*/
49
- class MongoDbStore implements BlockingStoreInterface
48
+ class MongoDbStore implements PersistingStoreInterface
50
49
{
51
50
private $ collection ;
52
51
private $ client ;
@@ -224,14 +223,6 @@ public function save(Key $key)
224
223
$ this ->checkNotExpired ($ key );
225
224
}
226
225
227
- /**
228
- * {@inheritdoc}
229
- */
230
- public function waitAndSave (Key $ key )
231
- {
232
- throw new NotSupportedException (sprintf ('The store "%s" does not support blocking locks. ' , __CLASS__ ));
233
- }
234
-
235
226
/**
236
227
* {@inheritdoc}
237
228
*
Original file line number Diff line number Diff line change 14
14
use MongoDB \Client ;
15
15
use MongoDB \Driver \Exception \ConnectionTimeoutException ;
16
16
use Symfony \Component \Lock \Exception \InvalidArgumentException ;
17
- use Symfony \Component \Lock \Exception \NotSupportedException ;
18
17
use Symfony \Component \Lock \Key ;
19
18
use Symfony \Component \Lock \PersistingStoreInterface ;
20
19
use Symfony \Component \Lock \Store \MongoDbStore ;
@@ -81,17 +80,6 @@ public function testCreateIndex()
81
80
$ this ->assertContains ('expires_at_1 ' , $ indexes );
82
81
}
83
82
84
- public function testNonBlocking ()
85
- {
86
- $ this ->expectException (NotSupportedException::class);
87
-
88
- $ store = $ this ->getStore ();
89
-
90
- $ key = new Key (uniqid (__METHOD__ , true ));
91
-
92
- $ store ->waitAndSave ($ key );
93
- }
94
-
95
83
/**
96
84
* @dataProvider provideConstructorArgs
97
85
*/
You can’t perform that action at this time.
0 commit comments