@@ -40,7 +40,7 @@ Use the Default Directory Structure
4040~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4141
4242Unless your project follows a development practice that imposes a certain
43- directory structure, follow the default Symfony directory structure. It's flat,
43+ directory structure, follow the default Symfony directory structure. It is flat,
4444self-explanatory and not coupled to Symfony:
4545
4646..code-block ::text
@@ -123,7 +123,7 @@ Then, use just one or two words to describe the purpose of the parameter:
123123app.dir :' ...'
124124# do this: short but easy to understand names
125125app.contents_dir :' ...'
126- # it's OK to use dots, underscores, dashes or nothing, but always
126+ # it is OK to use dots, underscores, dashes or nothing, but always
127127# be consistent and use the same format for all the parameters
128128app.dir.contents :' ...'
129129app.contents-dir :' ...'
@@ -150,7 +150,7 @@ Twig templates and Doctrine entities, whereas parameters are only available
150150from places with access to the:doc: `service container </service_container >`.
151151
152152The only notable disadvantage of using constants for this kind of configuration
153- values is that it's complicated to redefine their values in your tests.
153+ values is that it is complicated to redefine their values in your tests.
154154
155155Business Logic
156156--------------
@@ -191,9 +191,9 @@ Use the YAML Format to Configure your own Services
191191
192192If you use the:ref: `default services.yaml configuration <service-container-services-load-example >`,
193193most services will be configured automatically. However, in some edge cases
194- you'll need to configure services (or parts of them) manually.
194+ you will need to configure services (or parts of them) manually.
195195
196- YAML is the format recommended configuring services because it's friendly to
196+ YAML is the format recommended configuring services because it is friendly to
197197newcomers and concise, but Symfony also supports XML and PHP configuration.
198198
199199Use Attributes to Define the Doctrine Entity Mapping
@@ -203,7 +203,7 @@ Doctrine entities are plain PHP objects that you store in some "database".
203203Doctrine only knows about your entities through the mapping metadata configured
204204for your model classes.
205205
206- Doctrine supports several metadata formats, but it's recommended to use PHP
206+ Doctrine supports several metadata formats, but it is recommended to use PHP
207207attributes because they are by far the most convenient and agile way of setting
208208up and looking for mapping information.
209209
@@ -222,7 +222,7 @@ or checking security permissions.
222222
223223Extending your controllers from this base controller couples your application
224224to Symfony. Coupling is generally wrong, but it may be OK in this case because
225- controllersshouldn't contain any business logic. Controllers should contain
225+ controllersshould not contain any business logic. Controllers should contain
226226nothing more than a few lines of *glue-code *, so you are not coupling the
227227important parts of your application.
228228
@@ -257,12 +257,12 @@ constructor arguments.
257257Use ParamConverters If They Are Convenient
258258~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
259259
260- If you're using:doc: `Doctrine </doctrine >`, then you can *optionally * use the
260+ If you are using:doc: `Doctrine </doctrine >`, then you can *optionally * use the
261261`ParamConverter `_ to automatically query for an entity and pass it as an argument
262262to your controller. It will also show a 404 page if no entity can be found.
263263
264264If the logic to get an entity from a route variable is more complex, instead of
265- configuring the ParamConverter, it's better to make the Doctrine query inside
265+ configuring the ParamConverter, it is better to make the Doctrine query inside
266266the controller (e.g. by calling to a:doc: `Doctrine repository method </doctrine >`).
267267
268268Templates
@@ -298,16 +298,16 @@ Add Form Buttons in Templates
298298
299299Form classes should be agnostic to where they will be used. For example, the
300300button of a form used to both create and edit items should change from "Add new"
301- to "Save changes" depending on where it's used.
301+ to "Save changes" depending on where it is used.
302302
303- Instead of adding buttons in form classes or the controllers, it's recommended
303+ Instead of adding buttons in form classes or the controllers, it is recommended
304304to add buttons in the templates. This also improves the separation of concerns
305305because the button styling (CSS class and other attributes) is defined in the
306306template instead of in a PHP class.
307307
308308However, if you create a:doc: `form with multiple submit buttons </form/multiple_buttons >`
309309you should define them in the controller instead of the template. Otherwise, you
310- won't be able to check which button was clicked when handling the form in the controller.
310+ will not be able to check which button was clicked when handling the form in the controller.
311311
312312Define Validation Constraints on the Underlying Object
313313~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -323,7 +323,7 @@ Use a Single Action to Render and Process the Form
323323
324324:ref: `Rendering forms <rendering-forms >` and:ref: `processing forms <processing-forms >`
325325are two of the main tasks when handling forms. Both are too similar (most of the
326- time, almost identical), so it's much simpler to let a single controller action
326+ time, almost identical), so it is much simpler to let a single controller action
327327handle both.
328328
329329.. _best-practice-internationalization :
@@ -336,7 +336,7 @@ Use the XLIFF Format for Your Translation Files
336336
337337Of all the translation formats supported by Symfony (PHP, Qt, ``.po ``, ``.mo ``,
338338JSON, CSV, INI, etc.), ``XLIFF `` and ``gettext `` have the best support in the tools used
339- by professional translators. And since it's based on XML, you can validate ``XLIFF ``
339+ by professional translators. And since it is based on XML, you can validate ``XLIFF ``
340340file contents as you write them.
341341
342342Symfony also supports notes in XLIFF files, making them more user-friendly for
@@ -361,7 +361,7 @@ Define a Single Firewall
361361~~~~~~~~~~~~~~~~~~~~~~~~
362362
363363Unless you have two legitimately different authentication systems and users
364- (e.g. form login for the main site and a token system for your API only), it's
364+ (e.g. form login for the main site and a token system for your API only), it is
365365recommended to have only one firewall to keep things simple.
366366
367367Additionally, you should use the ``anonymous `` key under your firewall. If you
@@ -439,21 +439,21 @@ checks that all application URLs load successfully::
439439 }
440440
441441Add this test while creating your application because it requires little effort
442- and checks that none of your pages returns an error. Later, you'll add more
442+ and checks that none of your pages returns an error. Later, you will add more
443443specific tests for each page.
444444
445445.. _hardcode-urls-in-a-functional-test :
446446
447447Hard-code URLs in a Functional Test
448448~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449449
450- In Symfony applications, it's recommended to:ref: `generate URLs <routing-generating-urls >`
450+ In Symfony applications, it is recommended to:ref: `generate URLs <routing-generating-urls >`
451451using routes to automatically update all links when a URL changes. However, if a
452- public URL changes, userswon't be able to browse it unless you set up a
452+ public URL changes, userswill not be able to browse it unless you set up a
453453redirection to the new URL.
454454
455- That's why it's recommended to use raw URLs in tests instead of generating them
456- from routes. Whenever a route changes, tests will fail, and you'll know that
455+ That's why it is recommended to use raw URLs in tests instead of generating them
456+ from routes. Whenever a route changes, tests will fail, and you will know that
457457you must set up a redirection.
458458
459459.. _`Symfony Demo` :https://github.com/symfony/demo