Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2187947

Browse files
[HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase
1 parent b6857ba commit 2187947

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ protected static function createKernel(array $options = array())
171171
protected static function ensureKernelShutdown()
172172
{
173173
if (null !== static::$kernel) {
174+
$container = static::$kernel->getContainer();
174175
static::$kernel->shutdown();
176+
if ($container instanceof ResettableContainerInterface) {
177+
$container->reset();
178+
}
175179
}
176180
}
177181

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@ public function shutdown()
171171
$bundle->setContainer(null);
172172
}
173173

174-
if ($this->container instanceof ResettableContainerInterface) {
175-
$this->container->reset();
176-
}
177-
178174
$this->container = null;
179175
}
180176

0 commit comments

Comments
 (0)