@@ -457,52 +457,8 @@ routes with UTF-8 characters:
457
457
.. versionadded :: 4.3
458
458
459
459
The ``utf8 `` option/method has been introduced in Symfony 4.3.
460
- Before you had to use the ``options `` setting to define this value:
461
-
462
- .. configuration-block ::
463
-
464
- .. code-block :: php-annotations
465
-
466
- route1:
467
- path: /category/{name}
468
- controller: App\Controller\DefaultController::category
469
- options: { utf8: true }
470
-
471
- .. code-block :: yaml
472
-
473
- route1 :
474
- path : /category/{name}
475
- controller : App\Controller\DefaultController::category
476
- utf8 : true
477
-
478
- .. code-block :: xml
479
-
480
- <?xml version =" 1.0" encoding =" UTF-8" ?>
481
- <routes xmlns =" http://symfony.com/schema/routing"
482
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
483
- xsi : schemaLocation =" http://symfony.com/schema/routing
484
- https://symfony.com/schema/routing/routing-1.0.xsd" >
485
-
486
- <route id =" route1"
487
- path =" /category/{name}"
488
- controller =" App\Controller\DefaultController::category" >
489
- <option key =" utf8" >true</option >
490
- </route >
491
- </routes >
492
-
493
- .. code-block :: php
494
-
495
- // config/routes.php
496
- namespace Symfony\Component\Routing\Loader\Configurator;
497
-
498
- use App\Controller\DefaultController;
499
-
500
- return function (RoutingConfigurator $routes) {
501
- $routes->add('route1', '/category/{name}')
502
- ->controller([DefaultController::class, 'category'])
503
- ->options(['utf8' => true])
504
- ;
505
- };
460
+ Before you had to use the ``options `` setting to define this value (for
461
+ example, when using annotations: ``options={"utf8": true} ``).
506
462
507
463
In this route, the ``utf8 `` option set to ``true `` makes Symfony consider the
508
464
``. `` requirement to match any UTF-8 characters instead of just a single
0 commit comments