8000 bug #29783 [HttpFoundation] MemcachedSessionHandler::close() must clo… · symfony/symfony@a1a3ffc · GitHub
[go: up one dir, main page]

Skip to content

Commit a1a3ffc

Browse files
bug #29783 [HttpFoundation] MemcachedSessionHandler::close() must close connection (grachevko)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpFoundation] MemcachedSessionHandler::close() must close connection | Q | A | ------------- | --- | Branch? | 3.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | License | MIT Intoduced here #3333 Commits ------- 38a9d8b [Bugfix] MemcachedSessionHandler::close() must close connection
2 parents 46ebf23 + 38a9d8b commit a1a3ffc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(\Memcached $memcached, array $options = [])
6262
*/
6363
public function close()
6464
{
65-
return true;
65+
return $this->memcached->quit();
6666
}
6767

6868
/**

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ public function testOpenSession()
6363

6464
public function testCloseSession()
6565
{
66+
$this->memcached
67+
->expects($this->once())
68+
->method('quit')
69+
->will($this->returnValue(true))
70+
;
71+
6672
$this->assertTrue($this->storage->close());
6773
}
6874

0 commit comments

Comments
 (0)
0