Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 84849bc

Browse filesBrowse files
[FrameworkBundle] Deprecate *not* setting the "framework.router.utf8" option
1 parent 37a8863 commit 84849bc
Copy full SHA for 84849bc

File tree

18 files changed

+22
-9
lines changed
Filter options

18 files changed

+22
-9
lines changed

‎UPGRADE-5.1.md

Copy file name to clipboardExpand all lines: UPGRADE-5.1.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ FrameworkBundle
1010
---------------
1111

1212
* Deprecated passing a `RouteCollectionBuiler` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead
13+
* Deprecated *not* setting the "framework.router.utf8" configuration option as it will default to `true` in Symfony 6.0
1314

1415
HttpFoundation
1516
--------------

‎UPGRADE-6.0.md

Copy file name to clipboardExpand all lines: UPGRADE-6.0.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ FrameworkBundle
1010
---------------
1111

1212
* `MicroKernelTrait::configureRoutes()` is now always called with a `RoutingConfigurator`
13+
* The "framework.router.utf8" configuration option defaults to `true`
1314

1415
HttpFoundation
1516
--------------

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CHANGELOG
99
* Added flex-compatible default implementations for `MicroKernelTrait::registerBundles()` and `getProjectDir()`
1010
* Deprecated passing a `RouteCollectionBuiler` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead
1111
* The `TemplateController` now accepts context argument
12+
* Deprecated *not* setting the "framework.router.utf8" configuration option as it will default to `true` in Symfony 6.0
1213

1314
5.0.0
1415
-----

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ private function addRouterSection(ArrayNodeDefinition $rootNode)
481481
)
482482
->defaultTrue()
483483
->end()
484-
->booleanNode('utf8')->defaultFalse()->end()
484+
->booleanNode('utf8')->defaultNull()->end()
485485
->arrayNode('context')
486486
->info('router request context')
487487
->addDefaultsIfNotSet()

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,10 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
838838

839839
$loader->load('routing.xml');
840840

841+
if (null === $config['utf8']) {
842+
@trigger_error('Not setting the "framework.router.utf8" configuration option is deprecated since Symfony 5.1, it will default to "true" in Symfony 6.0.', E_USER_DEPRECATED);
843+
}
844+
841845
if ($config['utf8']) {
842846
$container->getDefinition('routing.loader')->replaceArgument(1, ['utf8' => true]);
843847
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ protected static function getBundleDefaultConfig()
412412
'http_port' => 80,
413413
'https_port' => 443,
414414
'strict_requirements' => true,
415-
'utf8' => false,
415+
'utf8' => null,
416416
'context' => [
417417
'host' => '%router.request_context.host%',
418418
'scheme' => '%router.request_context.scheme%',

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
'router' => [
2424
'resource' => '%kernel.project_dir%/config/routing.xml',
2525
'type' => 'xml',
26+
'utf8' => true,
2627
],
2728
'session' => [
2829
'storage_id' => 'session.storage.native',

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<framework:esi enabled="true" />
1515
<framework:ssi enabled="true" />
1616
<framework:profiler only-exceptions="true" enabled="false" />
17-
<framework:router resource="%kernel.project_dir%/config/routing.xml" type="xml" />
17+
<framework:router resource="%kernel.project_dir%/config/routing.xml" type="xml" utf8="true" />
1818
<framework:session gc-maxlifetime="90000" gc-probability="1" gc-divisor="108" storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="false" use-cookies="true" save-path="/path/to/sessions" sid-length="22" sid-bits-per-character="4" />
1919
<framework:request>
2020
<framework:format name="csv">

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ framework:
1616
router:
1717
resource: '%kernel.project_dir%/config/routing.xml'
1818
type: xml
19+
utf8: true
1920
session:
2021
storage_id: session.storage.native
2122
handler_id: session.handler.native_file

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
framework:
22
secret: test
3-
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml" }
3+
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml", utf8: true }
44
validation: { enabled: true, enable_annotations: true }
55
csrf_protection: true
66
form: true

‎src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
9191
$c->register('logger', NullLogger::class);
9292
$c->loadFromExtension('framework', [
9393
'secret' => '$ecret',
94+
'router' => ['utf8' => true],
9495
]);
9596

9697
$c->setParameter('halloween', 'Have a great day!');

‎src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,7 @@ protected function configureContainer(ContainerConfigurator $c)
8181
->set('stdClass', 'stdClass')
8282
->factory([$this, 'createHalloween'])
8383
->arg('$halloween', '%halloween%');
84+
85+
$c->extension('framework', ['router' => ['utf8' => true]]);
8486
}
8587
}

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSessionDomainConstraintPassTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSessionDomainConstraintPassTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private function createContainer($sessionStorageOptions)
140140
];
141141

142142
$ext = new FrameworkExtension();
143-
$ext->load(['framework' => ['csrf_protection' => false, 'router' => ['resource' => 'dummy']]], $container);
143+
$ext->load(['framework' => ['csrf_protection' => false, 'router' => ['resource' => 'dummy', 'utf8' => true]]], $container);
144144

145145
$ext = new SecurityExtension();
146146
$ext->load($config, $container);

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Anonymous/config.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Anonymous/config.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
framework:
22
secret: test
3-
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml" }
3+
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml", utf8: true }
44
validation: { enabled: true, enable_annotations: true }
55
csrf_protection: true
66
form: true

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
framework:
22
secret: test
3-
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml" }
3+
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml", utf8: true }
44
validation: { enabled: true, enable_annotations: true }
55
csrf_protection: true
66
form: true

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Guarded/config.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Guarded/config.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
framework:
22
secret: test
3-
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml" }
3+
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml", utf8: true }
44
test: ~
55
default_locale: en
66
profiler: false

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
framework:
22
secret: test
3-
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml" }
3+
router: { resource: "%kernel.project_dir%/%kernel.test_case%/routing.yml", utf8: true }
44
validation: { enabled: true, enable_annotations: true }
55
assets: ~
66
csrf_protection: true

‎src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Tests/Functional/WebProfilerBundleKernel.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ protected function configureContainer(ContainerBuilder $containerBuilder, Loader
4343
'secret' => 'foo-secret',
4444
'profiler' => ['only_exceptions' => false],
4545
'session' => ['storage_id' => 'session.storage.mock_file'],
46+
'router' => ['utf8' => true],
4647
]);
4748

4849
$containerBuilder->loadFromExtension('web_profiler', [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.