Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit baad4da

Browse filesBrowse files
[HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase
1 parent b6857ba commit baad4da
Copy full SHA for baad4da

File tree

2 files changed

+5
-5
lines changed
Filter options

2 files changed

+5
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
+5Lines 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

‎src/Symfony/Component/HttpKernel/Kernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Kernel.php
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
2424
use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
2525
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
26-
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
2726
use Symfony\Component\HttpFoundation\Request;
2827
use Symfony\Component\HttpFoundation\Response;
2928
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
@@ -171,10 +170,6 @@ public function shutdown()
171170
$bundle->setContainer(null);
172171
}
173172

174-
if ($this->container instanceof ResettableContainerInterface) {
175-
$this->container->reset();
176-
}
177-
178173
$this->container = null;
179174
}
180175

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.