Skip to content

Commit 0185a3b

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: Fix colors for 4.4 Stand with Ukraine [FrameworkBundle] Ensure container is reset between tests Remove blocking test for adding support for placeholders in EmumNode in 6.1
2 parents 47eefa4 + 6cf7910 commit 0185a3b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function all(string $namespace = null)
147147
*/
148148
public function getLongVersion()
149149
{
150-
return parent::getLongVersion().sprintf(' (env: <comment>%s</>, debug: <comment>%s</>)', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false');
150+
return parent::getLongVersion().sprintf(' (env: <comment>%s</>, debug: <comment>%s</>) <bg=blue;fg=yellow>#StandWith</><bg=yellow;fg=blue>Ukraine</> <href=https://sf.to/ukraine>https://sf.to/ukraine</>', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false');
151151
}
152152

153153
public function add(Command $command)

Test/KernelTestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\DependencyInjection\ContainerInterface;
1616
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
1717
use Symfony\Component\HttpKernel\KernelInterface;
18+
use Symfony\Contracts\Service\ResetInterface;
1819

1920
/**
2021
* KernelTestCase is the base class for tests needing a Kernel.
@@ -155,8 +156,13 @@ protected static function ensureKernelShutdown()
155156
{
156157
if (null !== static::$kernel) {
157158
static::$kernel->boot();
159+
$container = static::$kernel->getContainer();
158160
static::$kernel->shutdown();
159161
static::$booted = false;
162+
163+
if ($container instanceof ResetInterface) {
164+
$container->reset();
165+
}
160166
}
161167

162168
static::$container = null;

0 commit comments

Comments
 (0)