8000 Merge branch '2.8' into 3.3 · symfony/symfony@307ddb9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 307ddb9

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: bumped Symfony version to 2.7.36 updated VERSION for 2.7.35 update CONTRIBUTORS for 2.7.35 updated CHANGELOG for 2.7.35 [Session] fix MongoDb session handler to gc all expired sessions
2 parents 9568fae + c4282be commit 307ddb9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function destroy($sessionId)
118118
*/
119119
public function gc($maxlifetime)
120120
{
121-
$methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove';
121+
$methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteMany' : 'remove';
122122

123123
$this->getCollection()->$methodName(array(
124124
$this->options['expiry_field'] => array('$lt' => $this->createDateTime()),

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function testGc()
285285
->with($this->options['database'], $this->options['collection'])
286286
->will($this->returnValue($collection));
287287

288-
$methodName = phpversion('mongodb') ? 'deleteOne' : 'remove';
288+
$methodName = phpversion('mongodb') ? 'deleteMany' : 'remove';
289289

290290
$collection->expects($this->once())
291291
->method($methodName)

0 commit comments

Comments
 (0)
0