Skip to content

Commit

Permalink
Merge branch '6.4' into 7.1
Browse files Browse the repository at this point in the history
* 6.4:
  add missing namespace declaration
  Fix named arguments in data providers
  [FrameworkBundle] Do not access the container when the kernel is shut down
  • Loading branch information
xabbuh committed Sep 20, 2024
2 parents 69e306c + 6a9665b commit 8a792de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Test/KernelTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ protected static function ensureKernelShutdown()
if (null !== static::$kernel) {
static::$kernel->boot();
$container = static::$kernel->getContainer();
static::$kernel->shutdown();
static::$booted = false;

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

static::$kernel->shutdown();
static::$booted = false;

if ($container instanceof ResetInterface) {
$container->reset();
}
Expand Down

0 comments on commit 8a792de

Please sign in to comment.