8000 Merge branch '2.7' into 2.8 · symfony/symfony@18e5e70 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18e5e70

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [DebugBundle] Reword an outdated comment about var dumper wiring Ignore memcached missing key error on dession destroy
2 parents 4879eb4 + c951ca6 commit 18e5e70

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/Symfony/Bundle/DebugBundle/DebugBundle.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ public function boot()
2727
$container = $this->container;
2828

2929
// This code is here to lazy load the dump stack. This default
30-
// configuration for CLI mode is overridden in HTTP mode on
31-
// 'kernel.request' event
30+
// configuration is overridden in CLI mode on 'console.command' event.
31+
// The dump data collector is used by default, so dump output is sent to
32+
// the WDT. In a CLI context, if dump is used too soon, the data collector
33+
// will buffer it, and release it at the end of the script.
3234
VarDumper::setHandler(function ($var) use ($container) {
3335
$dumper = $container->get('data_collector.dump');
3436
$cloner = $container->get('var_dumper.cloner');

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ public function write($sessionId, $data)
9595
*/
9696
public function destroy($sessionId)
9797
{
98-
return $this->memcache->delete($this->prefix.$sessionId);
98+
$this->memcache->delete($this->prefix.$sessionId);
99+
100+
return true;
99101
}
100102

101103
/**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ public function write($sessionId, $data)
101101
*/
102102
public function destroy($sessionId)
103103
{
104-
return $this->memcached->delete($this->prefix.$sessionId);
104+
$result = $this->memcached->delete($this->prefix.$sessionId);
105+
106+
return $result || $this->memcached->getResultCode() == \Memcached::RES_NOTFOUND;
105107
}
106108

107109
/**

0 commit comments

Comments
 (0)
0