Skip to content

Commit 5dc1c9f

Browse files
committed
Minor tweaks
1 parent b7387b5 commit 5dc1c9f

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

components/routing.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ routes with UTF-8 characters:
424424
<route id="route1"
425425
path="/category/{name}"
426426
controller="App\Controller\DefaultController::category"
427-
utf8="true" />
427+
utf8="true"/>
428428
</routes>
429429
430430
.. code-block:: php
@@ -443,25 +443,24 @@ routes with UTF-8 characters:
443443
444444
.. versionadded:: 4.3
445445

446-
The ``utf8`` shortcut has been introduced in Symfony 4.3.
447-
Before you has to use the ``options`` setting to define
448-
this value:
446+
The ``utf8`` option/method has been introduced in Symfony 4.3.
447+
Before you had to use the ``options`` setting to define this value:
449448

450449
.. configuration-block::
451450

452451
.. code-block:: php-annotations
453452
454453
route1:
455-
path: /category/{name}
454+
path: /category/{name}
456455
controller: App\Controller\DefaultController::category
457-
options: { utf8: true }
456+
options: { utf8: true }
458457
459-
.. code-block:: yaml
458+
.. code-block:: yaml
460459
461-
route1:
462-
path: /category/{name}
463-
controller: App\Controller\DefaultController::category
464-
utf8: true
460+
route1:
461+
path: /category/{name}
462+
controller: App\Controller\DefaultController::category
463+
utf8: true
465464
466465
.. code-block:: xml
467466
@@ -473,7 +472,7 @@ routes with UTF-8 characters:
473472
474473
<route id="route1"
475474
path="/category/{name}"
476-
controller="App\Controller\DefaultController::category" >
475+
controller="App\Controller\DefaultController::category">
477476
<option key="utf8">true</option>
478477
</route>
479478
</routes>
@@ -544,7 +543,7 @@ You can also include UTF-8 strings as routing requirements:
544543
<route id="route2"
545544
path="/category/{name}"
546545
controller="App\Controller\DefaultController::category"
547-
utf8="true" >
546+
utf8="true">
548547
<default key="name">한국어</default>
549548
</route>
550549
</routes>

routing.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,13 +776,13 @@ You can also use special attributes to configure them (except ``_fragment``):
776776
777777
# config/routes.yaml
778778
article_search:
779-
path: /articles/{_locale}/search.{_format}
780-
controller: App\Controller\ArticleController::search
781-
locale: en
782-
format: html
779+
path: /articles/{_locale}/search.{_format}
780+
controller: App\Controller\ArticleController::search
781+
locale: en
782+
format: html
783783
requirements:
784-
_locale: en|fr
785-
_format: html|xml
784+
_locale: en|fr
785+
_format: html|xml
786786
787787
.. code-block:: xml
788788
@@ -816,19 +816,19 @@ You can also use special attributes to configure them (except ``_fragment``):
816816
$routes->add('article_show', '/articles/{_locale}/search.{_format}')
817817
->controller([ArticleController::class, 'search'])
818818
->locale('en')
819-
->format('html)
819+
->format('html')
820820
->requirements([
821821
'_locale' => 'en|fr',
822822
'_format' => 'html|rss',
823823
])
824824
;
825825
};
826826
827-
Those attributes can also be used for imports.
827+
These attributes can also be used for route imports.
828828

829829
.. versionadded::
830830

831-
The special attributes has been introduced in Symfony 4.3.
831+
The special attributes were introduced in Symfony 4.3.
832832

833833
.. _routing-trailing-slash-redirection:
834834

0 commit comments

Comments
 (0)