Skip to content

Commit 6a9665b

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: [FrameworkBundle] Do not access the container when the kernel is shut down
2 parents f40274b + 9ae1957 commit 6a9665b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Test/KernelTestCase.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,15 @@ protected static function ensureKernelShutdown()
126126
if (null !== static::$kernel) {
127127
static::$kernel->boot();
128128
$container = static::$kernel->getContainer();
129-
static::$kernel->shutdown();
130-
static::$booted = false;
131129

132130
if ($container->has('services_resetter')) {
133131
// Instantiate the service because Container::reset() only resets services that have been used
134132
$container->get('services_resetter');
135133
}
136134

135+
static::$kernel->shutdown();
136+
static::$booted = false;
137+
137138
if ($container instanceof ResetInterface) {
138139
$container->reset();
139140
}

0 commit comments

Comments
 (0)