Skip to content

Commit a1d7599

Browse files
Apply suggestions from Ryan review
Co-Authored-By: Ryan Weaver <[email protected]>
1 parent 92e3ffd commit a1d7599

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

routing.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
Routing
55
=======
66

7-
When your application receives an HTTP request, it executes some
7+
When your application receives an HTTP request, it executes a
88
:doc:`controller action </controller>` to generate the HTTP response. The
99
routing configuration defines which action to run for each incoming URL. It also
10-
provides other useful features, such as generating SEO-friendly URLs
10+
provides other useful features, like generating SEO-friendly URLs
1111
(e.g. ``/read/intro-to-symfony`` instead of ``index.php?article_id=57``).
1212

1313
Creating Routes
1414
---------------
1515

1616
Routes can be configured in YAML, XML, PHP or using annotations. All formats
17-
provide the same features and performance, so choose the one you prefer.
18-
:doc:`Symfony recommends to use annotations </best_practices/controllers>`
19-
because it's convenient to put the route definition and its controller in the
20-
same place instead of having to deal with multiple files.
17+
provide the same features and performance, so choose your favorite.
18+
:doc:`Symfony recommends annotations </best_practices/controllers>`
19+
because it's convenient to put the route and controller in the
20+
same place instead of dealing with multiple files.
2121

22-
If you choose PHP annotations, run this command once in your application to add
22+
If you choose annotations, run this command once in your application to add
2323
support for them:
2424

2525
.. code-block:: terminal
@@ -106,14 +106,14 @@ the ``list()`` method of the ``BlogController`` class.
106106
example, URLs like ``/blog?foo=bar`` and ``/blog?foo=bar&bar=foo`` will
107107
also match the ``blog_list`` route.
108108

109-
The route name is not important for now, but it will be essential later when
109+
The route name (``blog_list``) is not important for now, but it will be essential later when
110110
:ref:`generating URLs <routing-generating-urls>`. You only have to keep in mind
111-
that names can be chosen freely but they must be unique in the application.
111+
that each route name must be unique in the application.
112112

113113
Route HTTP Methods
114114
~~~~~~~~~~~~~~~~~~
115115

116-
By default, routes respond to any HTTP verb (``GET``, ``POST``, ``PUT``, etc.)
116+
By default, routes match any HTTP verb (``GET``, ``POST``, ``PUT``, etc.)
117117
Use the ``methods`` option to restrict the verbs each route should respond to:
118118

119119
.. configuration-block::
@@ -194,7 +194,7 @@ Use the ``methods`` option to restrict the verbs each route should respond to:
194194
195195
.. tip::
196196

197-
HTML forms only support ``GET`` and ``POST`` methods. If you are calling a
197+
HTML forms only support ``GET`` and ``POST`` methods. If you're calling a
198198
route with a different method from an HTML form, add a hidden field called
199199
``_method`` with the method to use (e.g. ``<input type="hidden" name="_method" value="PUT" />``).
200200
If you use :doc:`Symfony forms </forms>` this is done automatically for you.
@@ -332,13 +332,13 @@ with a locale. This can be done by defining a different prefix for each locale
332332
Route Groups
333333
~~~~~~~~~~~~
334334

335-
It's common for routes to share some features and options (e.g. all routes
335+
It's common for a group of routes to share some options (e.g. all routes
336336
related to the blog start with ``/blog``; all routes validate the locale with
337337
the same regular expression; etc.) That's why Symfony includes a feature to
338-
share the routes configuration.
338+
share route configuration.
339339

340-
When defining routes as annotations, add a ``@Route`` annotation to the
341-
controller class to apply some options to all the routes defined in that class::
340+
When defining routes as annotations, add an ``@Route`` annotation to the
341+
controller class to apply options to all the routes defined in that class::
342342

343343
use Symfony\Component\Routing\Annotation\Route;
344344

0 commit comments

Comments
 (0)