Skip to content

Commit bbce3db

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Correct spelling & grammar in 4.4 translation/ Correct spelling & grammar in 4.4 validation/ Correct spelling & grammar in 4.4 templating/ Correct spelling & grammar in 4.4 setup/ Correct spelling & grammar in 4.4 service_container/ Correct spelling & grammar in 4.4 security/ Correct spelling & grammar in 4.4 routing/ Correct spelling & grammar in 4.4 quick_tour/ Correct spelling & grammar in 4.4 profiler/ Correct spelling & grammar in 4.4 messenger/ Correct spelling & grammar in 4.4 logging/ Correct spelling & grammar in 4.4 introduction/ Correct spelling & grammar in 4.4 http_cache/ Correct spelling & grammar in 4.4 frontend/
2 parents ecab2a2 + d59e4be commit bbce3db

29 files changed

+53
-54
lines changed

frontend/encore/advanced-config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Summarized, Encore generates the Webpack configuration that's used in your
55
``webpack.config.js`` file. Encore doesn't support adding all of Webpack's
66
`configuration options`_, because many can be added on your own.
77

8-
For example, suppose you need to resolve automatically a new extension.
8+
For example, suppose you need to automatically resolve a new extension.
99
To do that, modify the config after fetching it from Encore:
1010

1111
.. code-block:: javascript

frontend/encore/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ And the new ``assets/styles/app.css`` file:
168168
background-color: lightgray;
169169
}
170170
171-
You'll customize and learn more about these file in :doc:`/frontend/encore/simple-example`.
171+
You'll customize and learn more about these files in :doc:`/frontend/encore/simple-example`.
172172

173173
.. caution::
174174

frontend/encore/page-specific-assets.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ page-specific JavaScript and CSS file from a page-specific entry (e.g. ``checkou
2424
.. tip::
2525

2626
Be sure to use :doc:`split chunks </frontend/encore/split-chunks>`
27-
to avoid duplicating and shared code between your entry files.
27+
to avoid duplicate and shared code between your entry files.

frontend/encore/simple-example.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ file to ``app.scss`` and update the ``import`` statement:
282282
- import './styles/app.css';
283283
+ import './styles/app.scss';
284284
285-
Then, tell Encore to enable the Sass pre-processor:
285+
Then, tell Encore to enable the Sass preprocessor:
286286

287287
.. code-block:: diff
288288

http_cache/cache_invalidation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ to support the ``PURGE`` HTTP method::
9191

9292
**Purge** instructs the cache to drop a resource in *all its variants*
9393
(according to the ``Vary`` header, see :doc:`/http_cache/cache_vary`). An alternative to purging is
94-
**refreshing** a content. Refreshing means that the caching proxy is
94+
**refreshing** the content. Refreshing means that the caching proxy is
9595
instructed to discard its local cache and fetch the content again. This way,
9696
the new content is already available in the cache. The drawback of refreshing
9797
is that variants are not invalidated.

http_cache/ssi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Symfony manages only the ``#include virtual`` one.
3333

3434
.. caution::
3535

36-
Be careful with SSI, your website may be victim of injections.
36+
Be careful with SSI, your website may fall victim to injections.
3737
Please read this `OWASP article`_ first!
3838

3939
When the web server reads an SSI directive, it requests the given URI or gives

http_cache/varnish.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ configuration of PHP, your session cookie has the name ``PHPSESSID``:
8989
set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", "");
9090
9191
if (req.http.Cookie == "") {
92-
// If there are no more cookies, remove the header to get page cached.
92+
// If there are no more cookies, remove the header to get the page cached.
9393
unset req.http.Cookie;
9494
}
9595
}

introduction/from_flat_php_to_symfony.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ have *many* controller functions: one for each page.
402402

403403
By now, the application has evolved from a single PHP file into a structure
404404
that is organized and allows for code reuse. You should be happier, but far
405-
from satisfied. For example, the routing system is fickle, and wouldn't
405+
from being satisfied. For example, the routing system is fickle, and wouldn't
406406
recognize that the list page - ``/index.php`` - should be accessible also via ``/``
407407
(if Apache rewrite rules were added). Also, instead of developing the blog,
408408
a lot of time is being spent working on the "architecture" of the code (e.g.

introduction/http_fundamentals.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ have all the request information at your fingertips::
234234
$request->getMethod(); // e.g. GET, POST, PUT, DELETE or HEAD
235235
$request->getLanguages(); // an array of languages the client accepts
236236

237-
As a bonus, the ``Request`` class does a lot of work in the background that
238-
you'll never need to worry about. For example, the ``isSecure()`` method
237+
As a bonus, the ``Request`` class does a lot of work in the background about which
238+
you will never need to worry. For example, the ``isSecure()`` method
239239
checks the *three* different values in PHP that can indicate whether or not
240-
the user is connecting via a secured connection (i.e. HTTPS).
240+
the user is connecting via a secure connection (i.e. HTTPS).
241241

242242
Symfony Response Object
243243
~~~~~~~~~~~~~~~~~~~~~~~

logging/handlers.rst

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

77
This handler deals directly with the HTTP interface of Elasticsearch. This means
8-
it will slow down your application if Elasticsearch takes times to answer. Even
8+
it will slow down your application if Elasticsearch takes time to answer. Even
99
if all HTTP calls are done asynchronously.
1010

1111
In a development environment, it's fine to keep the default configuration: for

logging/monolog_console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The example above could then be rewritten as::
6161

6262
Depending on the verbosity level that the command is run in and the user's
6363
configuration (see below), these messages may or may not be displayed to
64-
the console. If they are displayed, they are timestamped and colored appropriately.
64+
the console. If they are displayed, they are time-stamped and colored appropriately.
6565
Additionally, error logs are written to the error output (``php://stderr``).
6666
There is no need to conditionally handle the verbosity settings anymore.
6767

logging/monolog_email.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ is then passed onto the ``deduplicated`` handler.
145145

146146
The ``deduplicated`` handler keeps all the messages for a request and then
147147
passes them onto the nested handler in one go, but only if the records are
148-
unique over a given period of time (60 seconds by default). If the records are
149-
duplicated they are discarded. Adding this handler reduces the amount of
148+
unique over a given period of time (60 seconds by default). Duplicated records are
149+
discarded. Adding this handler reduces the amount of
150150
notifications to a manageable level, specially in critical failure scenarios.
151151
You can adjust the time period using the ``time`` option:
152152

logging/processors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Symfony's MonologBridge provides processors that can be registered inside your a
186186
Adds information about current route (controller, action, route parameters).
187187

188188
:class:`Symfony\\Bridge\\Monolog\\Processor\\ConsoleCommandProcessor`
189-
Adds information about current console command.
189+
Adds information about the current console command.
190190

191191
.. seealso::
192192

messenger/dispatch_after_current_bus.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ will not be rolled back.
126126
If ``WhenUserRegisteredThenSendWelcomeEmail`` throws an exception, that
127127
exception will be wrapped into a ``DelayedMessageHandlingException``. Using
128128
``DelayedMessageHandlingException::getExceptions`` will give you all
129-
exceptions that are thrown while handing a message with the
129+
exceptions that are thrown while handling a message with the
130130
``DispatchAfterCurrentBusStamp``.
131131

132132
The ``dispatch_after_current_bus`` middleware is enabled by default. If you're

messenger/multiple_buses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Debugging the Buses
227227
-------------------
228228

229229
The ``debug:messenger`` command lists available messages & handlers per bus.
230-
You can also restrict the list to a specific bus by providing its name as argument.
230+
You can also restrict the list to a specific bus by providing its name as an argument.
231231

232232
.. code-block:: terminal
233233

quick_tour/flex_recipes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ are included in your ``composer.json`` file:
2929
"symfony/yaml": "^4.1"
3030
}
3131
32-
This makes Symfony different than any other PHP framework! Instead of starting with
32+
This makes Symfony different from any other PHP framework! Instead of starting with
3333
a *bulky* app with *every* possible feature you might ever need, a Symfony app is
3434
small, simple and *fast*. And you're in total control of what you add.
3535

@@ -253,7 +253,7 @@ Not convinced yet? No problem: remove the library:
253253
254254
$ composer remove api
255255
256-
Flex will *uninstall* the recipes: removing files and un-doing changes to put your
256+
Flex will *uninstall* the recipes: removing files and undoing changes to put your
257257
app back in its original state. Experiment without worry.
258258

259259
More Features, Architecture and Speed

quick_tour/the_architecture.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ Environment Variables
287287
---------------------
288288

289289
Every app contains configuration that's different on each server - like database
290-
connection information or passwords. How should these be stored? In files? Or some
291-
other way?
290+
connection information or passwords. How should these be stored? In files? Or another way?
292291

293292
Symfony follows the industry best practice by storing server-based configuration
294293
as *environment* variables. This means that Symfony works *perfectly* with

routing/custom_route_loader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Symfony provides several route loaders for the most common needs:
8282
8383
.. note::
8484

85-
When importing resources, the key (e.g. ``app_file``) is the name of collection.
85+
When importing resources, the key (e.g. ``app_file``) is the name of the collection.
8686
Just be sure that it's unique per file so no other lines override it.
8787

8888
If your application needs are different, you can create your own custom route

routing/routing_from_database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When all routes are known during deploy time and the number is not too
2424
high, using a :doc:`custom route loader <custom_route_loader>` is the
2525
preferred way to add more routes. When working with only one type of
2626
objects, a slug parameter on the object and the ``@ParamConverter``
27-
annotation work fine (see `FrameworkExtraBundle`_) .
27+
annotation works fine (see `FrameworkExtraBundle`_) .
2828

2929
The ``DynamicRouter`` is useful when you need ``Route`` objects with
3030
the full feature set of Symfony. Each route can define a specific

security/voters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ example for voters.
2828

2929
Take a look at the
3030
:doc:`authorization </components/security/authorization>`
31-
article for an even deeper understanding on voters.
31+
article for an even deeper understanding of voters.
3232

3333
Here's how Symfony works with voters:
3434
All voters are called each time you use the ``isGranted()`` method on Symfony's

service_container/autowiring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ If there is *not* a service whose id exactly matches the type, a clear exception
186186
will be thrown.
187187

188188
Autowiring is a great way to automate configuration, and Symfony tries to be as
189-
*predictable* and clear as possible.
189+
*predictable* and as clear as possible.
190190

191191
.. _service-autowiring-alias:
192192

service_container/injection_types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ This approach is useful if you need to configure your service according to your
191191
so, here's the advantages of immutable-setters:
192192

193193
* Immutable setters works with optional dependencies, this way, if you don't need
194-
a dependency, the setter don't need to be called.
194+
a dependency, the setter doesn't need to be called.
195195

196196
* Like the constructor injection, using immutable setters force the dependency to stay
197197
the same during the lifetime of a service.

setup/bundles.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Upgrading a Third-Party Bundle for a Major Symfony Version
55
==========================================================
66

7-
Symfony 3 was released on November 2015. Although this version doesn't contain
7+
Symfony 3 was released in November 2015. Although this version doesn't contain
88
any new features, it removes all the backward compatibility layers included in
99
the previous 2.8 version. If your bundle uses any deprecated feature and it's
1010
published as a third-party bundle, applications upgrading to Symfony 3 will no
@@ -26,8 +26,8 @@ Most third-party bundles define their Symfony dependencies using the ``~2.N`` or
2626
}
2727
}
2828
29-
These constraints prevent the bundle from using Symfony 3 components, so it makes
30-
it impossible to install it in a Symfony 3 based application. Thanks to the
29+
These constraints prevent the bundle from using Symfony 3 components, which
30+
means the bundle cannot be installed in a Symfony 3 based application. Thanks to the
3131
flexibility of Composer dependencies constraints, you can specify more than one
3232
major version by replacing ``~2.N`` by ``~2.N|~3.0`` (or ``^2.N`` by ``^2.N|~3.0``).
3333

templating/global_variables.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
How to Inject Variables Automatically into all Templates
55
========================================================
66

7-
Twig allows to inject automatically one or more variables into all templates.
7+
Twig allows you to automatically inject one or more variables into all templates.
88
These global variables are defined in the ``twig.globals`` option inside the
99
main Twig configuration file:
1010

translation/locale.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ it::
3131
The custom listener must be called **before** ``LocaleListener``, which
3232
initializes the locale based on the current request. To do so, set your
3333
listener priority to a higher value than ``LocaleListener`` priority (which
34-
you can obtain running the ``debug:event kernel.request`` command).
34+
you can obtain by running the ``debug:event kernel.request`` command).
3535

3636
Read :doc:`/session/locale_sticky_session` for more information on making
3737
the user's locale "sticky" to their session.

translation/message_format.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ How to Translate Messages using the ICU MessageFormat
55
=====================================================
66

77
Messages (i.e. strings) in applications are almost never completely static.
8-
They contain variables or other complex logic like pluralization. In order to
8+
They contain variables or other complex logic like pluralization. To
99
handle this, the Translator component supports the `ICU MessageFormat`_ syntax.
1010

1111
.. tip::
@@ -88,7 +88,7 @@ Selecting Different Messages Based on a Condition
8888

8989
The curly brace syntax allows to "modify" the output of the variable. One of
9090
these functions is the ``select`` function. It acts like PHP's `switch statement`_
91-
and allows to use different strings based on the value of the variable. A
91+
and allows you to use different strings based on the value of the variable. A
9292
typical usage of this is gender:
9393

9494
.. configuration-block::
@@ -100,9 +100,9 @@ typical usage of this is gender:
100100
# the 'other' key is required, and is selected if no other case matches
101101
invitation_title: >-
102102
{organizer_gender, select,
103-
female {{organizer_name} has invited you for her party!}
104-
male {{organizer_name} has invited you for his party!}
105-
other {{organizer_name} have invited you for their party!}
103+
female {{organizer_name} has invited you to her party!}
104+
male {{organizer_name} has invited you to his party!}
105+
other {{organizer_name} have invited you to their party!}
106106
}
107107
108108
.. code-block:: xml
@@ -116,9 +116,9 @@ typical usage of this is gender:
116116
<source>invitation_title</source>
117117
<!-- the 'other' key is required, and is selected if no other case matches -->
118118
<target>{organizer_gender, select,
119-
female {{organizer_name} has invited you for her party!}
120-
male {{organizer_name} has invited you for his party!}
121-
other {{organizer_name} have invited you for their party!}
119+
female {{organizer_name} has invited you to her party!}
120+
male {{organizer_name} has invited you to his party!}
121+
other {{organizer_name} have invited you to their party!}
122122
}</target>
123123
</trans-unit>
124124
</body>
@@ -131,9 +131,9 @@ typical usage of this is gender:
131131
return [
132132
// the 'other' key is required, and is selected if no other case matches
133133
'invitation_title' => '{organizer_gender, select,
134-
female {{organizer_name} has invited you for her party!}
135-
male {{organizer_name} has invited you for his party!}
136-
other {{organizer_name} have invited you for their party!}
134+
female {{organizer_name} has invited you to her party!}
135+
male {{organizer_name} has invited you to his party!}
136+
other {{organizer_name} have invited you to their party!}
137137
}',
138138
];
139139
@@ -143,13 +143,13 @@ later, ``function_statement`` is optional for some functions). In this case,
143143
the function name is ``select`` and its statement contains the "cases" of this
144144
select. This function is applied over the ``organizer_gender`` variable::
145145

146-
// prints "Ryan has invited you for his party!"
146+
// prints "Ryan has invited you to his party!"
147147
echo $translator->trans('invitation_title', [
148148
'organizer_name' => 'Ryan',
149149
'organizer_gender' => 'male',
150150
]);
151151

152-
// prints "John & Jane have invited you for their party!"
152+
// prints "John & Jane have invited you to their party!"
153153
echo $translator->trans('invitation_title', [
154154
'organizer_name' => 'John & Jane',
155155
'organizer_gender' => 'not_applicable',
@@ -160,10 +160,10 @@ you to use literal text in the select statements:
160160

161161
#. The first ``{organizer_gender, select, ...}`` block starts the "code" mode,
162162
which means ``organizer_gender`` is processed as a variable.
163-
#. The inner ``{... has invited you for her party!}`` block brings you back in
163+
#. The inner ``{... has invited you to her party!}`` block brings you back in
164164
"literal" mode, meaning the text is not processed.
165165
#. Inside this block, ``{organizer_name}`` starts "code" mode again, allowing
166-
``organizer_name`` to be processed as variable.
166+
``organizer_name`` to be processed as a variable.
167167

168168
.. tip::
169169

@@ -240,7 +240,7 @@ handle pluralization in your messages (e.g. ``There are 3 apples`` vs
240240
Pluralization rules are actually quite complex and differ for each language.
241241
For instance, Russian uses different plural forms for numbers ending with 1;
242242
numbers ending with 2, 3 or 4; numbers ending with 5, 6, 7, 8 or 9; and even
243-
some exceptions of this!
243+
some exceptions to this!
244244

245245
In order to properly translate this, the possible cases in the ``plural``
246246
function are also different for each language. For instance, Russian has
@@ -294,7 +294,7 @@ Usage of this string is the same as with variables and select::
294294
.. sidebar:: Using Ranges in Messages
295295

296296
The pluralization in the legacy Symfony syntax could be used with custom
297-
ranges (e.g. have a different messages for 0-12, 12-40 and 40+). The ICU
297+
ranges (e.g. have different messages for 0-12, 12-40 and 40+). The ICU
298298
message format does not have this feature. Instead, this logic should be
299299
moved to PHP code::
300300

validation/custom_constraint.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The validator class only has one required method ``validate()``::
9797
// separate multiple types using pipes
9898
// throw new UnexpectedValueException($value, 'string|int');
9999
}
100-
100+
101101
// access your configuration options like this:
102102
if ('strict' === $constraint->mode) {
103103
// ...
@@ -256,8 +256,8 @@ With this, the validator's ``validate()`` method gets an object as its first arg
256256

257257
.. tip::
258258

259-
The ``atPath()`` method defines the property which the validation error is
260-
associated to. Use any :doc:`valid PropertyAccess syntax </components/property_access>`
259+
The ``atPath()`` method defines the property with which the validation error is
260+
associated. Use any :doc:`valid PropertyAccess syntax </components/property_access>`
261261
to define that property.
262262

263263
A class constraint validator is applied to the class itself, and

validation/groups.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ With this configuration, there are three validation groups:
163163

164164
``registration``
165165
This is a custom validation group, so it only contains the constraints
166-
explicitly associated to it. In this example, only the ``email`` and
166+
that are explicitly associated with it. In this example, only the ``email`` and
167167
``password`` fields.
168168

169169
Constraints in the ``Default`` group of a class are the constraints that have

validation/sequence_provider.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ method, which should return an array of groups to use::
336336
public function getGroupSequence()
337337
{
338338
// when returning a simple array, if there's a violation in any group
339-
// the rest of groups are not validated. E.g. if 'User' fails,
339+
// the rest of the groups are not validated. E.g. if 'User' fails,
340340
// 'Premium' and 'Api' are not validated:
341341
return ['User', 'Premium', 'Api'];
342342

0 commit comments

Comments
 (0)