Skip to content

Commit 8db66a5

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: Removed more belittling words and expressions
2 parents 327170e + cdb1c3c commit 8db66a5

40 files changed

+108
-107
lines changed

_build/maintainer_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ Step 2: Merge the pull request
120120
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

123-
We require 2 approval votes from team members before merging a PR, except if
124-
it's a typo, a small change or an obvious error.
123+
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.
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

best_practices/business-logic.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ distributed among developers, with a slight preference towards YAML.
109109
Both formats have the same performance, so this is ultimately a matter of
110110
personal taste.
111111

112-
We recommend YAML because it's friendly to newcomers and concise. You can
113-
use any of the other formats if you prefer another format.
112+
We recommend YAML because it's friendly to newcomers and concise, but you can
113+
use whatever format you like.
114114

115115
Using a Persistence Layer
116116
-------------------------

best_practices/configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ Constants can be used for example in your Twig templates thanks to the
138138
Displaying the {{ constant('NUMBER_OF_ITEMS', post) }} most recent results.
139139
</p>
140140

141-
And Doctrine entities and repositories can now easily access these values,
142-
whereas they cannot access the container parameters::
141+
And Doctrine entities and repositories can access these values too, whereas they
142+
cannot access the container parameters::
143143

144144
namespace App\Repository;
145145

@@ -155,7 +155,7 @@ whereas they cannot access the container parameters::
155155
}
156156

157157
The only notable disadvantage of using constants for this kind of configuration
158-
values is that you cannot redefine them easily in your tests.
158+
values is that it's complicated to redefine their values in your tests.
159159

160160
Parameter Naming
161161
----------------

best_practices/controllers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ The ``@Template`` annotation is useful, but also involves some magic. We
8989
don't think its benefit is worth the magic, and so recommend against using
9090
it.
9191

92-
Most of the time, ``@Template`` is used without any parameters, which makes
93-
it more difficult to know which template is being rendered. It also makes
94-
it less obvious to beginners that a controller should always return a Response
95-
object (unless you're using a view layer).
92+
Most of the time, ``@Template`` is used without any parameters, which makes it
93+
more difficult to know which template is being rendered. It also hides the fact
94+
that a controller should always return a Response object (unless you're using a
95+
view layer).
9696

9797
What does the Controller look like
9898
----------------------------------

best_practices/security.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ primarily under the ``firewalls`` key.
1818
API only), we recommend having only *one* firewall entry with the ``anonymous``
1919
key enabled.
2020

21-
Most applications only have one authentication system and one set of users.
22-
For this reason, you only need *one* firewall entry. There are exceptions
23-
of course, especially if you have separated web and API sections on your
24-
site. But the point is to keep things simple.
21+
Most applications only have one authentication system and one set of users. For
22+
this reason, you only need *one* firewall entry. If you have separated web and
23+
API sections on your site, you will need more firewall entries. But the point is
24+
to keep things simple.
2525

2626
Additionally, you should use the ``anonymous`` key under your firewall. If
2727
you need to require users to be logged in for different sections of your

best_practices/tests.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ The built-in functional testing client is great, but it can't be used to
106106
test any JavaScript behavior on your pages. If you need to test this, consider
107107
using the `Mink`_ library from within PHPUnit.
108108

109-
Of course, if you have a heavy JavaScript front-end, you should consider using
110-
pure JavaScript-based testing tools.
109+
If you have a heavy JavaScript frontend, you should consider using pure
110+
JavaScript-based testing tools.
111111

112112
Learn More about Functional Tests
113113
---------------------------------

components/dom_crawler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The :class:`Symfony\\Component\\DomCrawler\\Crawler` class provides methods
3434
to query and manipulate HTML and XML documents.
3535

3636
An instance of the Crawler represents a set of :phpclass:`DOMElement` objects,
37-
which are basically nodes that you can traverse::
37+
which are nodes that can be traversed as follows::
3838

3939
use Symfony\Component\DomCrawler\Crawler;
4040

components/dotenv.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ defined in previously loaded files:
8888
#. If there's a ``.env.$env.local`` file, this one is loaded. Otherwise, it falls
8989
back to ``.env.$env``.
9090

91-
This might look complicated at first glance but it gives you the opportunity to commit
92-
multiple environment-specific files that can then be adjusted to your local environment
93-
easily. Given you commit ``.env``, ``.env.test`` and ``.env.dev`` to represent different
94-
configuration settings for your environments, each of them can be adjusted by using
95-
``.env.local``, ``.env.test.local`` and ``.env.dev.local`` respectively.
91+
This might look complicated at first glance but it gives you the opportunity to
92+
commit multiple environment-specific files that can then be adjusted to your
93+
local environment. Given you commit ``.env``, ``.env.test`` and ``.env.dev`` to
94+
represent different configuration settings for your environments, each of them
95+
can be adjusted by using ``.env.local``, ``.env.test.local`` and
96+
``.env.dev.local`` respectively.
9697

9798
.. note::
9899

components/form.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ You can disable CSRF protection per form using the ``csrf_protection`` option::
163163
Twig Templating
164164
~~~~~~~~~~~~~~~
165165

166-
If you're using the Form component to process HTML forms, you'll need a way
167-
to render your form as HTML form fields (complete with field values,
168-
errors, and labels). If you use `Twig`_ as your template engine, the Form
169-
component offers a rich integration.
166+
If you're using the Form component to process HTML forms, you'll need a way to
167+
render your form as HTML form fields (complete with field values, errors, and
168+
labels). If you use `Twig`_ as your template engine, the Form component offers a
169+
rich integration.
170170

171171
To use the integration, you'll need the twig bridge, which provides integration
172172
between Twig and several Symfony components:

components/http_foundation/session_testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Testing with Sessions
66
=====================
77

88
Symfony is designed from the ground up with code-testability in mind. In order
9-
to make your code which utilizes session easily testable, we provide two separate
10-
mock storage mechanisms for both unit testing and functional testing.
9+
to test your code which utilizes sessions, we provide two separate mock storage
10+
mechanisms for both unit testing and functional testing.
1111

1212
Testing code using real sessions is tricky because PHP's workflow state is global
1313
and it is not possible to have multiple concurrent sessions in the same PHP

components/security/authorization.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ role::
159159

160160
.. note::
161161

162-
When you make your own voter, you can use its constructor
163-
to inject any dependencies it needs to come to a decision.
162+
When you make your own voter, you can use its constructor to inject any
163+
dependencies it needs to come to a decision.
164164

165165
Roles
166166
-----

configuration/front_controllers_and_kernel.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ This class uses the name of the environment - which is passed to the Kernel's
101101
method and is available via :method:`Symfony\\Component\\HttpKernel\\Kernel::getEnvironment` -
102102
to decide which bundles to enable. The logic for that is in ``registerBundles()``.
103103

104-
You are, of course, free to create your own, alternative or additional
105-
``Kernel`` variants. All you need is to adapt your (or add a new) front
106-
controller to make use of the new kernel.
104+
You are free to create your own, alternative or additional ``Kernel`` variants.
105+
All you need is to adapt your (or add a new) front controller to make use of the
106+
new kernel.
107107

108108
.. note::
109109

contributing/code/bugs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If your problem definitely looks like a bug, report it using the official bug
2626
* Describe the steps needed to reproduce the bug with short code examples
2727
(providing a unit test that illustrates the bug is best);
2828

29-
* If the bug you experienced is not obvious or affects more than one layer,
29+
* If the bug you experienced is not simple or affects more than one layer,
3030
providing a simple failing unit test may not be sufficient. In this case,
3131
please :doc:`provide a reproducer </contributing/code/reproducer>`;
3232

contributing/code/reproducer.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Creating a Bug Reproducer
22
=========================
33

44
The main Symfony code repository receives thousands of issues reports per year.
5-
Some of those issues are so obvious or easy to understand, that Symfony Core
6-
developers can fix them without any other information. However, other issues are
7-
much harder to understand because developers can't easily reproduce them in their
8-
computers. That's when we'll ask you to create a "bug reproducer", which is the
9-
minimum amount of code needed to make the bug appear when executed.
5+
Some of those issues are easy to understand and the Symfony Core developers can
6+
fix them without any other information. However, other issues are much harder to
7+
understand because developers can't reproduce them in their computers. That's
8+
when we'll ask you to create a "bug reproducer", which is the minimum amount of
9+
code needed to make the bug appear when executed.
1010

1111
Reproducing Simple Bugs
1212
-----------------------

contributing/community/reviews.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ On the `Symfony issue tracker`_, you can find many items in a `Needs Review`_
2424
status:
2525

2626
* **Bug Reports**: Bug reports need to be checked for completeness.
27-
Is any important information missing? Can the bug be *easily* reproduced?
27+
Is any important information missing? Can the bug be reproduced?
2828

2929
* **Pull Requests**: Pull requests contain code that fixes a bug or implements
3030
new functionality. Reviews of pull requests ensure that they are implemented
@@ -146,7 +146,7 @@ Pick a pull request from the `PRs in need of review`_ and follow these steps:
146146
* Does the PR stay within scope to address *only* that issue?
147147
* Does the PR contain automated tests? Do those tests cover all relevant
148148
edge cases?
149-
* Does the PR contain sufficient comments to easily understand its code?
149+
* Does the PR contain sufficient comments to understand its code?
150150
* Does the code break backward compatibility? If yes, does the PR header say
151151
so?
152152
* Does the PR contain deprecations? If yes, does the PR header say so? Does

create_framework/http_foundation.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ top of the Symfony components is better than creating a framework from scratch.
99

1010
.. note::
1111

12-
We won't talk about the obvious and traditional benefits of using a
13-
framework when working on big applications with more than a few
14-
developers; the Internet has already plenty of good resources on that
15-
topic.
12+
We won't talk about the traditional benefits of using a framework when
13+
working on big applications with more than a few developers; the Internet
14+
has already plenty of good resources on that topic.
1615

1716
Even if the "application" we wrote in the previous chapter was simple enough,
1817
it suffers from a few problems::
@@ -87,9 +86,9 @@ reading this book now and go back to whatever code you were working on before.
8786

8887
.. note::
8988

90-
Of course, using a framework should give you more than just security and
91-
testability, but the more important thing to keep in mind is that the
92-
framework you choose must allow you to write better code faster.
89+
Using a framework should give you more than just security and testability,
90+
but the more important thing to keep in mind is that the framework you
91+
choose must allow you to write better code faster.
9392

9493
Going OOP with the HttpFoundation Component
9594
-------------------------------------------

create_framework/http_kernel_httpkernel_class.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ The error controller reads as follows::
104104
}
105105
}
106106

107-
Voilà! Clean and customizable error management without efforts. And
108-
if your ``ErrorController`` throws an exception, HttpKernel will handle it nicely.
107+
*Voilà!* Clean and customizable error management without efforts. And if your
108+
``ErrorController`` throws an exception, HttpKernel will handle it nicely.
109109

110110
In chapter two, we talked about the ``Response::prepare()`` method, which
111111
ensures that a Response is compliant with the HTTP specification. It is

create_framework/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ you can use as is or as a start for your very own. It will start with a simple
3838
framework and more features will be added with time. Eventually, you will have
3939
a fully-featured full-stack web framework.
4040

41-
And each step will be the occasion to learn more about some of the
42-
Symfony Components.
41+
And each step will be the occasion to learn more about some of the Symfony
42+
Components.
4343

4444
Many modern web frameworks advertize themselves as being MVC frameworks. This
4545
tutorial won't talk about the MVC pattern, as the Symfony Components are able to

create_framework/templating.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ the ``_controller`` route attribute::
6969
$response = new Response('An error occurred', 500);
7070
}
7171

72-
A route can now be associated with any controller and within a
73-
controller, you can still use the ``render_template()`` to render a template::
72+
A route can now be associated with any controller and within a controller, you
73+
can still use the ``render_template()`` to render a template::
7474

7575
$routes->add('hello', new Routing\Route('/hello/{name}', [
7676
'name' => 'World',

deployment.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ manually taking other steps (see `Common Post-Deployment Tasks`_).
6363
Using Platforms as a Service
6464
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6565

66-
Using a Platform as a Service (PaaS) can be a great way to deploy your Symfony app
67-
quickly and easily. There are many PaaS - below are a few that work well with Symfony:
66+
Using a Platform as a Service (PaaS) can be a great way to deploy your Symfony
67+
app quickly. There are many PaaS - below are a few that work well with Symfony:
6868

6969
* `Symfony Cloud`_
7070
* `Heroku`_

doctrine.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ your production database up-to-date.
242242
Migrations & Adding more Fields
243243
-------------------------------
244244

245-
But what if you need to add a new field property to ``Product``, like a ``description``?
246-
You can edit the class to add the new property. But, you can also use ``make:entity``
247-
again:
245+
But what if you need to add a new field property to ``Product``, like a
246+
``description``? You can edit the class to add the new property. But, you can
247+
also use ``make:entity`` again:
248248

249249
.. code-block:: terminal
250250

email/spool.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ You can also set the time limit in seconds:
141141
142142
$ APP_ENV=prod php bin/console swiftmailer:spool:send --time-limit=10
143143
144-
You will most likely not want to run this command manually in reality. Instead, the
145-
console command should be triggered by a cron job or scheduled task and run
146-
at a regular interval.
144+
In practice you will not want to run this manually. Instead, the console command
145+
should be triggered by a cron job or scheduled task and run at a regular
146+
interval.
147147

148148
.. caution::
149149

form/form_customization.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ form_rest(form_view, variables)
305305

306306
This renders all fields that have not yet been rendered for the given form.
307307
It's a good idea to always have this somewhere inside your form as it'll
308-
render hidden fields for you and make any fields you forgot to render more
309-
obvious (since it'll render the field for you).
308+
render hidden fields for you and make any fields you forgot to render easier to
309+
spot (since it'll render the field for you).
310310

311311
.. code-block:: twig
312312

frontend/encore/shared-entry.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ then ``jquery`` would be packaged into *both* files, which is wasteful. By makin
3030
*no longer* be packaged into any other files. The same is true for any CSS.
3131

3232
Because ``app.js`` contains all the common code that other entry files depend on,
33-
it's obvious that its script (and link) tag must be on every page.
33+
its script (and link) tag must be on every page.
3434

3535
.. tip::
3636

frontend/encore/simple-example.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ application: it will *require* all of the dependencies it needs (e.g. jQuery or
2323
2424
Encore's job (via Webpack) is simple: to read and follow *all* of the ``require``
2525
statements and create one final ``app.js`` (and ``app.css``) that contains *everything*
26-
your app needs. Of course, Encore can do a lot more: minify files, pre-process Sass/LESS,
26+
your app needs. Encore can do a lot more: minify files, pre-process Sass/LESS,
2727
support React, Vue.js, etc.
2828

2929
Configuring Encore/Webpack

http_cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Caching on the Shoulders of Giants
1313
----------------------------------
1414

1515
With HTTP Caching, you cache the full output of a page (i.e. the response) and bypass
16-
your application *entirely* on subsequent requests. Of course, caching entire responses
16+
your application *entirely* on subsequent requests. Caching entire responses
1717
isn't always possible for highly dynamic sites, or is it? With
1818
:doc:`Edge Side Includes (ESI) </http_cache/esi>`, you can use the power of HTTP caching
1919
on only *fragments* of your site.

introduction/from_flat_php_to_symfony.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ of *your* code that processes user input and prepares the response.
133133

134134
In this case, the controller prepares data from the database and then includes
135135
a template to present that data. With the controller isolated, you could
136-
easily change *just* the template file if you needed to render the blog
136+
change *just* the template file if you needed to render the blog
137137
entries in some other format (e.g. ``list.json.php`` for JSON format).
138138

139139
Isolating the Application (Domain) Logic
@@ -243,9 +243,8 @@ the ``templates/layout.php``:
243243
You now have a setup that will allow you to reuse the layout.
244244
Unfortunately, to accomplish this, you're forced to use a few ugly
245245
PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony
246-
uses a :doc:`Templating </components/templating>` component
247-
that allows this to be accomplished cleanly and easily. You'll see it in
248-
action shortly.
246+
solves this using a :doc:`Templating </components/templating>` component.
247+
You'll see it in action shortly.
249248

250249
Adding a Blog "show" Page
251250
-------------------------
@@ -307,7 +306,7 @@ Creating the second page now requires very little work and no code is duplicated
307306
this page introduces even more lingering problems that a framework can solve
308307
for you. For example, a missing or invalid ``id`` query parameter will cause
309308
the page to crash. It would be better if this caused a 404 page to be rendered,
310-
but this can't really be done easily yet.
309+
but this can't really be done yet.
311310

312311
Another major problem is that each individual controller file must include
313312
the ``model.php`` file. What if each controller file suddenly needed to include

introduction/http_fundamentals.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ and more.
275275
that you can use in *any* PHP project. This also contains classes for handling
276276
sessions, file uploads and more.
277277

278-
If Symfony offered nothing else, you would already have a toolkit for conveniently
279-
accessing request information and an object-oriented interface for creating
280-
the response. Even as you learn the many powerful features in Symfony, keep
281-
in mind that the goal of your application is always *to interpret a request
282-
and create the appropriate response based on your application logic*.
278+
If Symfony offered nothing else, you would already have a toolkit for accessing
279+
request information and an object-oriented interface for creating the response.
280+
Even as you learn the many powerful features in Symfony, keep in mind that the
281+
goal of your application is always *to interpret a request and create the
282+
appropriate response based on your application logic*.
283283

284284
The Journey from the Request to the Response
285285
--------------------------------------------

page_creation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ Great news! You've already worked inside the most important directories in your
264264
project:
265265

266266
``config/``
267-
Contains... configuration of course!. You will configure routes, :doc:`services </service_container>`
268-
and packages.
267+
Contains... configuration!. You will configure routes,
268+
:doc:`services </service_container>` and packages.
269269

270270
``src/``
271271
All your PHP code lives here.

0 commit comments

Comments
 (0)