Skip to content

Commit 776af3e

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Test/KernelTestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Test;
1313

14+
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
1415
use Symfony\Component\Finder\Finder;
1516
use Symfony\Component\HttpKernel\KernelInterface;
1617

@@ -171,7 +172,11 @@ protected static function createKernel(array $options = array())
171172
protected static function ensureKernelShutdown()
172173
{
173174
if (null !== static::$kernel) {
175+
$container = static::$kernel->getContainer();
174176
static::$kernel->shutdown();
177+
if ($container instanceof ResettableContainerInterface) {
178+
$container->reset();
179+
}
175180
}
176181
}
177182

0 commit comments

Comments
 (0)