Skip to content

Commit 682562a

Browse files
committed
No contraction
1 parent c7463b2 commit 682562a

File tree

286 files changed

+1214
-1213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+1214
-1213
lines changed

.doctor-rst.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ rules:
2929
no_blank_line_after_filepath_in_yaml_code_block: ~
3030
no_brackets_in_method_directive: ~
3131
no_composer_req: ~
32+
no_contraction: ~
3233
no_directive_after_shorthand: ~
3334
no_explicit_use_of_code_block_php: ~
3435
no_inheritdoc: ~

_build/maintainer_guide.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Symfony Docs Maintainer Guide
33

44
The `symfony/symfony-docs`_ repository stores the Symfony project documentation
55
and is managed by the `Symfony Docs team`_. This article explains in detail some
6-
of those management tasks, so it's only useful for maintainers and not regular
6+
of those management tasks, so it is only useful for maintainers and not regular
77
readers or Symfony developers.
88

99
Reviewing Pull Requests
@@ -17,7 +17,7 @@ but there are extra things to keep in mind for maintainers:
1717
* Don't assume that contributors know what you think is obvious (e.g. lots of
1818
them don't know what to "squash commits" means).
1919
* Don't use acronyms like IMO, IIRC, etc. or complex English words (most
20-
contributors are not native in English and it's intimidating for them).
20+
contributors are not native in English and it is intimidating for them).
2121
* Never engage in a heated discussion. Lock it right away using GitHub.
2222
* Never discuss non-tech issues. Some PRs are related to our Diversity initiative
2323
and some people always try to drag you into politics. Never engage in that and
@@ -26,14 +26,14 @@ but there are extra things to keep in mind for maintainers:
2626
Fixing Minor Issues Yourself
2727
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2828

29-
It's common for new contributors to make lots of minor mistakes in the syntax
30-
of the RST format used in the docs. It's also common for non English speakers to
29+
It is common for new contributors to make lots of minor mistakes in the syntax
30+
of the RST format used in the docs. It is also common for non English speakers to
3131
make minor typos.
3232

3333
Even if your intention is good, if you add lots of comments when reviewing a
34-
first contribution, that person will probably not contribute again. It's better
34+
first contribution, that person will probably not contribute again. It is better
3535
to fix the minor errors and typos yourself while merging. If that person
36-
contributes again, it's OK to mention some of the minor issues to educate them.
36+
contributes again, it is OK to mention some of the minor issues to educate them.
3737

3838
.. code-block:: terminal
3939
@@ -53,7 +53,7 @@ contributes again, it's OK to mention some of the minor issues to educate them.
5353
$ git commit -a
5454
# Use "Minor reword", "Minor tweak", etc. as the commit message
5555
56-
# now run the 'push' command shown above by 'gh' (it's different each time)
56+
# now run the 'push' command shown above by 'gh' (it is different each time)
5757
$ git push gh "5.4" refs/notes/github-comments
5858
5959
Merging Pull Requests
@@ -93,8 +93,8 @@ interface. Then:
9393
Merging Process
9494
~~~~~~~~~~~~~~~
9595

96-
At first, it's common to make mistakes and merge things badly. Don't worry. This
97-
has happened to all of us and we've always been able to recover from any mistake.
96+
At first, it is common to make mistakes and merge things badly. Don't worry. This
97+
has happened to all of us and we have always been able to recover from any mistake.
9898

9999
Step 1: Select the right branch to merge
100100
........................................
@@ -107,7 +107,7 @@ PRs must be merged in the oldest maintained branch where they are applicable:
107107
usually means ``master``. And don't forget to check that new feature includes
108108
the ``versionadded`` directive.
109109

110-
It's very common for contributors (specially newcomers) to select the wrong
110+
It is very common for contributors (specially newcomers) to select the wrong
111111
branch for their PRs, so we must always check if the change should go to the
112112
proposed branch or not.
113113

@@ -121,12 +121,12 @@ Never use GitHub's web interface (or desktop clients) to merge PRs or to solve
121121
merge conflicts. Always use the ``gh`` tool for anything related to merges.
122122

123123
We require two approval votes from team members before merging a PR, except if
124-
it's a typo, a small change or clearly an error.
124+
it is a typo, a small change or clearly an error.
125125

126126
If a PR contains lots of commits, there's no need to ask the contributor to
127127
squash them. The ``gh`` tool does that automatically. The only exceptions are
128128
when commits are made by more than one person and when there's a merge commit.
129-
``gh`` can't squash commits in those cases, so it's better to ask to the
129+
``gh`` cannot squash commits in those cases, so it is better to ask to the
130130
original contributor.
131131

132132
.. code-block:: terminal
@@ -147,13 +147,13 @@ original contributor.
147147
$ git push origin
148148
$ git push upstream
149149
150-
It's common to have to change the branch where a PR is merged. Instead of asking
150+
It is common to have to change the branch where a PR is merged. Instead of asking
151151
the contributors to rebase their PRs, the "gh" tool can change the branch with
152152
the ``-s`` option:
153153

154154
.. code-block:: terminal
155155
156-
# e.g. this PR was sent against 'master', but it's merged in '4.4'
156+
# e.g. this PR was sent against 'master', but it is merged in '4.4'
157157
$ gh merge 11160 -s 4.4
158158
159159
Sometimes, when changing the branch, you may face rebase issues, but they are
@@ -228,7 +228,7 @@ maintained branches until ``master``. Imagine that you are merging a PR against
228228

229229
.. tip::
230230

231-
When the support of a Symfony branch ends, it's recommended to delete your
231+
When the support of a Symfony branch ends, it is recommended to delete your
232232
local branch to avoid merging in it unawarely:
233233

234234
.. code-block:: terminal
@@ -250,12 +250,12 @@ When updating your local branches before merging:
250250
$ git checkout 4.4
251251
$ git merge upstream/4.4
252252
253-
It's possible that you merge a wrong upstream branch unawarely. It's usually
254-
easy to spot because you'll see lots of conflicts:
253+
It is possible that you merge a wrong upstream branch unawarely. It is usually
254+
easy to spot because you will see lots of conflicts:
255255

256256
.. code-block:: terminal
257257
258-
# DON'T DO THIS! It's a wrong branch merge
258+
# DON'T DO THIS! It is a wrong branch merge
259259
$ git checkout 4.4
260260
$ git merge upstream/5.0
261261
@@ -269,12 +269,12 @@ local branch and check it out again:
269269
$ git checkout 4.4 upstream/4.4
270270
271271
If you did push the wrong branch merge, ask for help in the documentation
272-
mergers chat and we'll help solve the problem.
272+
mergers chat and we will help solve the problem.
273273

274274
Solving merge conflicts
275275
.......................
276276

277-
When merging things to upper branches, most of the times you'll see conflicts:
277+
When merging things to upper branches, most of the times you will see conflicts:
278278

279279
.. code-block:: terminal
280280
@@ -303,7 +303,7 @@ the marker used by Git for conflicts) and then do this:
303303
.. tip::
304304

305305
When there are lots of conflicts, look for ``<<<<<`` with your editor in all
306-
docs before committing the changes. It's common to forget about some of them.
306+
docs before committing the changes. It is common to forget about some of them.
307307
If you prefer, you can run this too: ``git grep --cached "<<<<<"``.
308308

309309
Merging deleted files

_includes/_annotation_loader_tip.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
.. tip::
77

8-
Annotation classes aren't loaded automatically, so you must load them
8+
Annotation classes are not loaded automatically, so you must load them
99
using a class loader like this::
1010

1111
use Composer\Autoload\ClassLoader;

_includes/_rewrite_rule_tip.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
By using rewrite rules in your
44
:doc:`web server configuration </setup/web_server_configuration>`,
5-
the ``index.php`` won't be needed and you will have beautiful, clean URLs
5+
the ``index.php`` will not be needed and you will have beautiful, clean URLs
66
(e.g. ``/show``).

best_practices.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Use the Default Directory Structure
4040
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4141

4242
Unless 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,
4444
self-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:
123123
app.dir: '...'
124124
# do this: short but easy to understand names
125125
app.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
128128
app.dir.contents: '...'
129129
app.contents-dir: '...'
@@ -150,7 +150,7 @@ Twig templates and Doctrine entities, whereas parameters are only available
150150
from places with access to the :doc:`service container </service_container>`.
151151

152152
The 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

155155
Business Logic
156156
--------------
@@ -191,9 +191,9 @@ Use the YAML Format to Configure your own Services
191191

192192
If you use the :ref:`default services.yaml configuration <service-container-services-load-example>`,
193193
most 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
197197
newcomers and concise, but Symfony also supports XML and PHP configuration.
198198

199199
Use Attributes to Define the Doctrine Entity Mapping
@@ -203,7 +203,7 @@ Doctrine entities are plain PHP objects that you store in some "database".
203203
Doctrine only knows about your entities through the mapping metadata configured
204204
for 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
207207
attributes because they are by far the most convenient and agile way of setting
208208
up and looking for mapping information.
209209

@@ -222,7 +222,7 @@ or checking security permissions.
222222

223223
Extending your controllers from this base controller couples your application
224224
to Symfony. Coupling is generally wrong, but it may be OK in this case because
225-
controllers shouldn't contain any business logic. Controllers should contain
225+
controllers should not contain any business logic. Controllers should contain
226226
nothing more than a few lines of *glue-code*, so you are not coupling the
227227
important parts of your application.
228228

@@ -257,12 +257,12 @@ constructor arguments.
257257
Use 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
262262
to your controller. It will also show a 404 page if no entity can be found.
263263

264264
If 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
266266
the controller (e.g. by calling to a :doc:`Doctrine repository method </doctrine>`).
267267

268268
Templates
@@ -298,16 +298,16 @@ Add Form Buttons in Templates
298298

299299
Form classes should be agnostic to where they will be used. For example, the
300300
button 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
304304
to add buttons in the templates. This also improves the separation of concerns
305305
because the button styling (CSS class and other attributes) is defined in the
306306
template instead of in a PHP class.
307307

308308
However, if you create a :doc:`form with multiple submit buttons </form/multiple_buttons>`
309309
you 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

312312
Define 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>`
325325
are 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
327327
handle both.
328328

329329
.. _best-practice-internationalization:
@@ -336,7 +336,7 @@ Use the XLIFF Format for Your Translation Files
336336

337337
Of all the translation formats supported by Symfony (PHP, Qt, ``.po``, ``.mo``,
338338
JSON, 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``
340340
file contents as you write them.
341341

342342
Symfony also supports notes in XLIFF files, making them more user-friendly for
@@ -361,7 +361,7 @@ Define a Single Firewall
361361
~~~~~~~~~~~~~~~~~~~~~~~~
362362

363363
Unless 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
365365
recommended to have only one firewall to keep things simple.
366366

367367
Additionally, you should use the ``anonymous`` key under your firewall. If you
@@ -439,21 +439,21 @@ checks that all application URLs load successfully::
439439
}
440440

441441
Add 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
443443
specific tests for each page.
444444

445445
.. _hardcode-urls-in-a-functional-test:
446446

447447
Hard-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>`
451451
using routes to automatically update all links when a URL changes. However, if a
452-
public URL changes, users won't be able to browse it unless you set up a
452+
public URL changes, users will not be able to browse it unless you set up a
453453
redirection 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
457457
you must set up a redirection.
458458

459459
.. _`Symfony Demo`: https://github.com/symfony/demo

bundles.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ file::
3030
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
3131
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
3232
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
33-
// this bundle is enabled only in 'dev' and 'test', so you can't use it in 'prod'
33+
// this bundle is enabled only in 'dev' and 'test', so you cannot use it in 'prod'
3434
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
3535
];
3636

@@ -69,7 +69,7 @@ called ``AcmeTestBundle.php``::
6969

7070
This empty class is the only piece you need to create the new bundle. Though
7171
commonly empty, this class is powerful and can be used to customize the behavior
72-
of the bundle. Now that you've created the bundle, enable it::
72+
of the bundle. Now that you have created the bundle, enable it::
7373

7474
// config/bundles.php
7575
return [
@@ -111,7 +111,7 @@ to be adjusted if needed:
111111
A bundle can be as small or large as the feature it implements. It contains
112112
only the files you need and nothing else.
113113

114-
As you move through the guides, you'll learn how to persist objects to a
114+
As you move through the guides, you will learn how to persist objects to a
115115
database, create and validate forms, create translations for your application,
116116
write tests and much more. Each of these has their own place and role within
117117
the bundle.

bundles/best_practices.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ CSS or any other language.
165165
Doctrine Entities/Documents
166166
---------------------------
167167

168-
If the bundle includes Doctrine ORM entities and/or ODM documents, it's
168+
If the bundle includes Doctrine ORM entities and/or ODM documents, it is
169169
recommended to define their mapping using XML files stored in
170170
``Resources/config/doctrine/``. This allows to override that mapping using the
171171
:doc:`standard Symfony mechanism to override bundle parts </bundles/override>`.
@@ -255,7 +255,7 @@ Installation
255255

256256
Bundles should set ``"type": "symfony-bundle"`` in their ``composer.json`` file.
257257
With this, :ref:`Symfony Flex <symfony-flex>` will be able to automatically
258-
enable your bundle when it's installed.
258+
enable your bundle when it is installed.
259259

260260
If your bundle requires any setup (e.g. configuration, new files, changes to
261261
``.gitignore``, etc), then you should create a `Symfony Flex recipe`_.
@@ -467,7 +467,7 @@ Services
467467
If the bundle defines services, they must be prefixed with the bundle alias
468468
instead of using fully qualified class names like you do in your project
469469
services. For example, AcmeBlogBundle services must be prefixed with ``acme_blog``.
470-
The reason is that bundles shouldn't rely on features such as service autowiring
470+
The reason is that bundles should not rely on features such as service autowiring
471471
or autoconfiguration to not impose an overhead when compiling application services.
472472

473473
In addition, services not meant to be used by the application directly, should
@@ -508,7 +508,7 @@ The ``composer.json`` file should include at least the following metadata:
508508
a string (or array of strings) with a `valid license identifier`_, such as ``MIT``.
509509

510510
``autoload``
511-
This information is used by Symfony to load the classes of the bundle. It's
511+
This information is used by Symfony to load the classes of the bundle. It is
512512
recommended to use the `PSR-4`_ autoload standard: use the namespace as key,
513513
and the location of the bundle's main class (relative to ``composer.json``)
514514
as value. As the main class is located in the ``src/`` directory of the bundle:

0 commit comments

Comments
 (0)