Skip to content

Commit 1a13a57

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 daa8283 + bea4df7 commit 1a13a57

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

src/Symfony/Bundle/FrameworkBundle/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)

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,6 @@ public function testConcatenatedEnvInConfig()
153153
$this->assertSame(['scalar_node' => $expected], $container->resolveEnvPlaceholders($ext->getConfig()));
154154
}
155155

156-
public function testEnvIsIncompatibleWithEnumNode()
157-
{
158-
$this->expectException(InvalidConfigurationException::class);
159-
$this->expectExceptionMessage('A dynamic value is not compatible with a "Symfony\Component\Config\Definition\EnumNode" node type at path "env_extension.enum_node".');
160-
$container = new ContainerBuilder();
161-
$container->registerExtension(new EnvExtension());
162-
$container->prependExtensionConfig('env_extension', [
163-
'enum_node' => '%env(FOO)%',
164-
]);
165-
166-
$this->doProcess($container);
167-
}
168-
169156
public function testEnvIsIncompatibleWithArrayNode()
170157
{
171158
$this->expectException(InvalidConfigurationException::class);

0 commit comments

Comments
 (0)