Skip to content

Commit b08e15f

Browse files
committed
minor #565 explicitly set framework.router.utf8 value in test kernel (jrushlow)
This PR was squashed before being merged into the 1.0-dev branch (closes #565). Discussion ---------- explicitly set framework.router.utf8 value in test kernel fixes `Since symfony/framework-bundle 5.1: Not setting the "framework.router.utf8" configuration option is deprecated, it will default to "true" in version 6.0.` deprecation warning in tests / ci not intended to address any other deprecation's or fix/refactor other logic Commits ------- f22883f explicitly set framework.router.utf8 value in test kernel
2 parents 560eb8f + f22883f commit b08e15f

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/Test/MakerTestKernel.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ protected function configureRouting(RoutingConfigurator $routes)
5353

5454
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
5555
{
56-
$c->setParameter('kernel.secret', 123);
56+
$c->loadFromExtension('framework', [
57+
'secret' => 123,
58+
'router' => [
59+
'utf8' => true,
60+
],
61+
]);
5762
}
5863

5964
public function getProjectDir()

tests/Doctrine/EntityRegeneratorTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@ protected function configureRoutes(RouteCollectionBuilder $routes)
151151

152152
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
153153
{
154-
$c->setParameter('kernel.secret', 123);
154+
$c->loadFromExtension('framework', [
155+
'secret' => 123,
156+
'router' => [
157+
'utf8' => true,
158+
],
159+
]);
160+
155161
$c->prependExtensionConfig('doctrine', [
156162
'dbal' => [
157163
'driver' => 'pdo_sqlite',
@@ -200,7 +206,13 @@ protected function configureRoutes(RouteCollectionBuilder $routes)
200206

201207
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
202208
{
203-
$c->setParameter('kernel.secret', 123);
209+
$c->loadFromExtension('framework', [
210+
'secret' => 123,
211+
'router' => [
212+
'utf8' => true,
213+
],
214+
]);
215+
204216
$c->prependExtensionConfig('doctrine', [
205217
'dbal' => [
206218
'driver' => 'pdo_sqlite',

0 commit comments

Comments
 (0)