Skip to content

Commit fd217f3

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: Restore a reference to a section Correct spelling & grammar in 4.4 components/ Correct spelling & grammar in 4.4. contributing/ Correct spelling & grammar in 4.4 reference/ Correct spelling & grammar in 4.4 messenger.rst Correct spelling & grammar in 4.4. frontend.rst Correct spelling & grammar in 4.4 forms.rst Correct spelling & grammar in 4.4 event_dispatcher.rst Correct spelling & grammar in 4.4 email.rst Correct spelling & grammar in 4.4 CODE_OF_CONDUCT.md Correct spelling & grammar in 4.4 cache.rst Correct spelling & grammar in 4.4 best-practices.rst Correct spelling & grammar in 4.4 security.rst
2 parents d4a76ae + ab0d697 commit fd217f3

Some content is hidden

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

41 files changed

+108
-104
lines changed

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Scope
5252

5353
This Code of Conduct applies both within project spaces and in public spaces
5454
when an individual is representing the project or its community. Examples of
55-
representing a project or community include using an official project e-mail
55+
representing a project or community include using an official project email
5656
address, posting via an official social media account, or acting as an appointed
5757
representative at an online or offline event. Representation of a project may be
5858
further defined and clarified by CARE team members.

best_practices.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Templates
269269
Use Snake Case for Template Names and Variables
270270
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
271271

272-
Use lowercased snake_case for template names, directories and variables (e.g.
272+
Use lowercase snake_case for template names, directories and variables (e.g.
273273
``user_profile`` instead of ``userProfile`` and ``product/edit_form.html.twig``
274274
instead of ``Product/EditForm.html.twig``).
275275

@@ -387,7 +387,7 @@ Use Webpack Encore to Process Web Assets
387387
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
388388

389389
Web assets are things like CSS, JavaScript and image files that make the
390-
frontend of your site look and work great. `Webpack`_ is the leading JavaScript
390+
frontend of your site looks and works great. `Webpack`_ is the leading JavaScript
391391
module bundler that compiles, transforms and packages assets for usage in a browser.
392392

393393
:doc:`Webpack Encore </frontend>` is a JavaScript library that gets rid of most
@@ -439,7 +439,9 @@ Add this test while creating your application because it requires little effort
439439
and checks that none of your pages returns an error. Later, you'll add more
440440
specific tests for each page.
441441

442-
Hardcode URLs in a Functional Test
442+
.. _hardcode-urls-in-a-functional-test:
443+
444+
Hard-code URLs in a Functional Test
443445
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444446

445447
In Symfony applications, it's recommended to :ref:`generate URLs <routing-generating-urls>`

cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ of:
4545
An adapter is a *template* that you use to create pools.
4646
**Provider**
4747
A provider is a service that some adapters use to connect to the storage.
48-
Redis and Memcached are example of such adapters. If a DSN is used as the
48+
Redis and Memcached are examples of such adapters. If a DSN is used as the
4949
provider then a service is automatically created.
5050

5151
There are two pools that are always enabled by default. They are ``cache.app`` and

components/asset.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Asset Component
88
The Asset component manages URL generation and versioning of web assets such
99
as CSS stylesheets, JavaScript files and image files.
1010

11-
In the past, it was common for web applications to hardcode URLs of web assets.
11+
In the past, it was common for web applications to hard-code the URLs of web assets.
1212
For example:
1313

1414
.. code-block:: html
@@ -375,7 +375,7 @@ they all have different base paths::
375375
$packages = new Packages($defaultPackage, $namedPackages);
376376

377377
The ``Packages`` class allows to define a default package, which will be applied
378-
to assets that don't define the name of package to use. In addition, this
378+
to assets that don't define the name of the package to use. In addition, this
379379
application defines a package named ``img`` to serve images from an external
380380
domain and a ``doc`` package to avoid repeating long paths when linking to a
381381
document inside a template::

components/http_kernel.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ on the request's information.
249249

250250
The Symfony Framework uses the built-in
251251
:class:`Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver`
252-
class (actually, it uses a sub-class with some extra functionality
252+
class (actually, it uses a subclass with some extra functionality
253253
mentioned below). This class leverages the information that was placed
254254
on the ``Request`` object's ``attributes`` property during the ``RouterListener``.
255255

@@ -358,7 +358,7 @@ of arguments that should be passed when executing that callable.
358358
5) Calling the Controller
359359
~~~~~~~~~~~~~~~~~~~~~~~~~
360360

361-
The next step ``HttpKernel::handle()`` does is executing the controller.
361+
The next step of ``HttpKernel::handle()`` is executing the controller.
362362

363363
The job of the controller is to build the response for the given resource.
364364
This could be an HTML page, a JSON string or anything else. Unlike every
@@ -590,7 +590,7 @@ on creating and attaching event listeners, see :doc:`/components/event_dispatche
590590

591591
The name of each of the "kernel" events is defined as a constant on the
592592
:class:`Symfony\\Component\\HttpKernel\\KernelEvents` class. Additionally, each
593-
event listener is passed a single argument, which is some sub-class of :class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`.
593+
event listener is passed a single argument, which is some subclass of :class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`.
594594
This object contains information about the current state of the system and
595595
each event has their own event object:
596596

@@ -667,7 +667,7 @@ Sub Requests
667667
------------
668668

669669
In addition to the "main" request that's sent into ``HttpKernel::handle()``,
670-
you can also send so-called "sub request". A sub request looks and acts like
670+
you can also send a so-called "sub request". A sub request looks and acts like
671671
any other request, but typically serves to render just one small portion of
672672
a page instead of a full page. You'll most commonly make sub-requests from
673673
your controller (or perhaps from inside a template, that's being rendered by
@@ -696,9 +696,9 @@ argument as follows::
696696
This creates another full request-response cycle where this new ``Request`` is
697697
transformed into a ``Response``. The only difference internally is that some
698698
listeners (e.g. security) may only act upon the main request. Each listener
699-
is passed some sub-class of :class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`,
699+
is passed some subclass of :class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`,
700700
whose :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::isMainRequest`
701-
can be used to check if the current request is a "main" or "sub" request.
701+
method can be used to check if the current request is a "main" or "sub" request.
702702

703703
For example, a listener that only needs to act on the main request may
704704
look like this::

components/lock.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ method will try to acquire the lock::
4646

4747
if ($lock->acquire()) {
4848
// The resource "pdf-invoice-generation" is locked.
49-
// You can compute and generate invoice safely here.
49+
// You can compute and generate the invoice safely here.
5050

5151
$lock->release();
5252
}
@@ -65,7 +65,7 @@ method can be safely called repeatedly, even if the lock is already acquired.
6565
.. tip::
6666

6767
If you don't release the lock explicitly, it will be released automatically
68-
on instance destruction. In some cases, it can be useful to lock a resource
68+
upon instance destruction. In some cases, it can be useful to lock a resource
6969
across several requests. To disable the automatic release behavior, set the
7070
third argument of the ``createLock()`` method to ``false``.
7171

@@ -74,7 +74,7 @@ Serializing Locks
7474

7575
The ``Key`` contains the state of the ``Lock`` and can be serialized. This
7676
allows the user to begin a long job in a process by acquiring the lock, and
77-
continue the job in an other process using the same lock::
77+
continue the job in another process using the same lock::
7878

7979
use Symfony\Component\Lock\Key;
8080
use Symfony\Component\Lock\Lock;
@@ -210,7 +210,7 @@ as seconds) and ``isExpired()`` (which returns a boolean).
210210
Automatically Releasing The Lock
211211
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212212

213-
Lock are automatically released when their Lock objects are destructed. This is
213+
Locks are automatically released when their Lock objects are destructed. This is
214214
an implementation detail that will be important when sharing Locks between
215215
processes. In the example below, ``pcntl_fork()`` creates two processes and the
216216
Lock will be released automatically as soon as one process finishes::
@@ -688,11 +688,11 @@ FlockStore
688688
~~~~~~~~~~
689689

690690
By using the file system, this ``Store`` is reliable as long as concurrent
691-
processes use the same physical directory to stores locks.
691+
processes use the same physical directory to store locks.
692692

693693
Processes must run on the same machine, virtual machine or container.
694-
Be careful when updating a Kubernetes or Swarm service because for a short
695-
period of time, there can be two running containers in parallel.
694+
Be careful when updating a Kubernetes or Swarm service because, for a short
695+
period of time, there can be two containers running in parallel.
696696

697697
The absolute path to the directory must remain the same. Be careful of symlinks
698698
that could change at anytime: Capistrano and blue/green deployment often use
@@ -704,7 +704,7 @@ Some file systems (such as some types of NFS) do not support locking.
704704
.. caution::
705705

706706
All concurrent processes must use the same physical file system by running
707-
on the same machine and using the same absolute path to locks directory.
707+
on the same machine and using the same absolute path to the lock directory.
708708

709709
By definition, usage of ``FlockStore`` in an HTTP context is incompatible
710710
with multiple front servers, unless to ensure that the same resource will
@@ -726,7 +726,7 @@ MemcachedStore
726726

727727
The way Memcached works is to store items in memory. That means that by using
728728
the :ref:`MemcachedStore <lock-store-memcached>` the locks are not persisted
729-
and may disappear by mistake at anytime.
729+
and may disappear by mistake at any time.
730730

731731
If the Memcached service or the machine hosting it restarts, every lock would
732732
be lost without notifying the running processes.
@@ -803,7 +803,7 @@ The PdoStore relies on the `ACID`_ properties of the SQL engine.
803803
.. caution::
804804

805805
In a cluster configured with multiple primaries, ensure writes are
806-
synchronously propagated to every nodes, or always use the same node.
806+
synchronously propagated to every node, or always use the same node.
807807

808808
.. caution::
809809

@@ -838,7 +838,7 @@ RedisStore
838838

839839
The way Redis works is to store items in memory. That means that by using
840840
the :ref:`RedisStore <lock-store-redis>` the locks are not persisted
841-
and may disappear by mistake at anytime.
841+
and may disappear by mistake at any time.
842842

843843
If the Redis service or the machine hosting it restarts, every locks would
844844
be lost without notifying the running processes.
@@ -865,7 +865,7 @@ removed by mistake.
865865
CombinedStore
866866
~~~~~~~~~~~~~
867867

868-
Combined stores allow to store locks across several backends. It's a common
868+
Combined stores allow the storage of locks across several backends. It's a common
869869
mistake to think that the lock mechanism will be more reliable. This is wrong.
870870
The ``CombinedStore`` will be, at best, as reliable as the least reliable of
871871
all managed stores. As soon as one managed store returns erroneous information,

components/mime.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ complexity to provide two ways of creating MIME messages:
3434
* A high-level API based on the :class:`Symfony\\Component\\Mime\\Email` class
3535
to quickly create email messages with all the common features;
3636
* A low-level API based on the :class:`Symfony\\Component\\Mime\\Message` class
37-
to have an absolute control over every single part of the email message.
37+
to have absolute control over every single part of the email message.
3838

3939
Usage
4040
-----
@@ -56,7 +56,7 @@ methods to compose the entire email message::
5656
->html('<h1>Lorem ipsum</h1> <p>...</p>')
5757
;
5858

59-
This only purpose of this component is to create the email messages. Use the
59+
The only purpose of this component is to create the email messages. Use the
6060
:doc:`Mailer component </mailer>` to actually send them.
6161

6262
Twig Integration

components/options_resolver.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,8 @@ if you need to use other options during normalization::
451451
}
452452
}
453453

454-
To normalize a new allowed value in sub-classes that are being normalized
455-
in parent classes use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addNormalizer`.
454+
To normalize a new allowed value in subclasses that are being normalized
455+
in parent classes, use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addNormalizer` method.
456456
This way, the ``$value`` argument will receive the previously normalized
457457
value, otherwise you can prepend the new normalizer by passing ``true`` as
458458
third argument.
@@ -465,7 +465,7 @@ encryption chosen by the user of the ``Mailer`` class. More precisely, you want
465465
to set the port to ``465`` if SSL is used and to ``25`` otherwise.
466466

467467
You can implement this feature by passing a closure as the default value of
468-
the ``port`` option. The closure receives the options as argument. Based on
468+
the ``port`` option. The closure receives the options as arguments. Based on
469469
these options, you can return the desired default value::
470470

471471
use Symfony\Component\OptionsResolver\Options;
@@ -497,7 +497,7 @@ these options, you can return the desired default value::
497497
.. note::
498498

499499
The closure is only executed if the ``port`` option isn't set by the user
500-
or overwritten in a sub-class.
500+
or overwritten in a subclass.
501501

502502
A previously set default value can be accessed by adding a second argument to
503503
the closure::

components/process.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ You can configure the options passed to the ``other_options`` argument of
120120
Using Features From the OS Shell
121121
--------------------------------
122122

123-
Using array of arguments is the recommended way to define commands. This
123+
Using an array of arguments is the recommended way to define commands. This
124124
saves you from any escaping and allows sending signals seamlessly
125125
(e.g. to stop processes while they run)::
126126

@@ -331,7 +331,7 @@ provides the :class:`Symfony\\Component\\Process\\InputStream` class::
331331
echo $process->getOutput();
332332

333333
The :method:`Symfony\\Component\\Process\\InputStream::write` method accepts scalars,
334-
stream resources or ``Traversable`` objects as argument. As shown in the above example,
334+
stream resources or ``Traversable`` objects as arguments. As shown in the above example,
335335
you need to explicitly call the :method:`Symfony\\Component\\Process\\InputStream::close`
336336
method when you are done writing to the standard input of the subprocess.
337337

components/property_access.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ properties through *adder* and *remover* methods::
399399
The PropertyAccess component checks for methods called ``add<SingularOfThePropertyName>()``
400400
and ``remove<SingularOfThePropertyName>()``. Both methods must be defined.
401401
For instance, in the previous example, the component looks for the ``addChild()``
402-
and ``removeChild()`` methods to access to the ``children`` property.
402+
and ``removeChild()`` methods to access the ``children`` property.
403403
`The Inflector component`_ is used to find the singular of a property name.
404404

405405
If available, *adder* and *remover* methods have priority over a *setter* method.

components/property_info.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ strings::
208208
Example Result
209209
--------------
210210
string(79):
211-
These is the subsequent paragraph in the DocComment.
211+
This is the subsequent paragraph in the DocComment.
212212
It can span multiple lines.
213213
*/
214214

components/serializer.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
603603

604604
You can also implement
605605
:class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface`
606-
to access to the current class name, format and context.
606+
to access the current class name, format and context.
607607

608608
.. _using-camelized-method-names-for-underscored-attributes:
609609

@@ -996,7 +996,7 @@ Option Description D
996996
and ``$options = ['csv_headers' => ['a', 'b', 'c']]``
997997
then ``serialize($data, 'csv', $options)`` returns
998998
``a,b,c\n1,2,3`` ``[]``, inferred from input data's keys
999-
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
999+
``csv_escape_formulas`` Escapes fields containing formulas by prepending them ``false``
10001000
with a ``\t`` character
10011001
``as_collection`` Always returns results as a collection, even if only ``true``
10021002
one line is decoded.

components/var_exporter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ any other methods::
118118
Instances of ``ArrayObject``, ``ArrayIterator`` and ``SplObjectHash`` can be
119119
created by using the special ``"\0"`` property name to define their internal value::
120120

121-
// Creates an SplObjectHash where $info1 is associated to $object1, etc.
121+
// Creates an SplObjectHash where $info1 is associated with $object1, etc.
122122
$theObject = Instantiator::instantiate(SplObjectStorage::class, [
123123
"\0" => [$object1, $info1, $object2, $info2...],
124124
]);

contributing/code/bc.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ may introduce new features, but must do so without breaking the existing API of
1010
that release branch (5.x in the previous example).
1111

1212
We also provide deprecation message triggered in the code base to help you with
13-
the migration process across major release.
13+
the migration process across major releases.
1414

1515
.. caution::
1616

contributing/code/core_team.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ The **Project Leader** is also the release manager for every Symfony version.
171171
Symfony Core Rules and Protocol Amendments
172172
------------------------------------------
173173

174-
The rules described in this document may be amended at anytime at the
174+
The rules described in this document may be amended at any time at the
175175
discretion of the **Project Leader**.
176176

177177
.. [1] Minor changes comprise typos, DocBlock fixes, code standards

contributing/code/maintenance.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ are never accepted in a patch version:
7474
.. note::
7575

7676
This policy is designed to enable a continuous upgrade path that allows one
77-
to move forward with newest Symfony versions in the safest way. One should
77+
to move forward with the newest Symfony versions in the safest way. One should
7878
be able to move PHP versions, OS or Symfony versions almost independently.
7979
That's the reason why supporting the latest PHP versions or OS features is
8080
considered as bug fixes.

contributing/code/stack_trace.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ things for you beforehand, like routing or access control.
5656
Symfony being both a framework and library of components, it calls your
5757
code and then your code might call it. This means you will always have
5858
at least 2 parts, very often 3 in your stack traces when using Symfony:
59-
a part that starts in one of the entrypoints of the framework
59+
a part that starts in one of the entry points of the framework
6060
(``bin/console`` or ``public/index.php`` in most cases), and ends when
6161
reaching your code, most times in a command or in a controller found under
6262
``src``. Then, either the exception is thrown in your code or in
@@ -75,7 +75,7 @@ Next, you can have a look at what packages are involved. Files under
7575
library and ``acme/router`` the Composer package. If you plan on
7676
reporting the bug, make sure to report it to the library throwing the
7777
exception. ``composer home acme/router`` should lead you to the right
78-
place for that. As Symfony is a monorepository, use ``composer home
78+
place for that. As Symfony is a mono-repository, use ``composer home
7979
symfony/symfony`` when reporting a bug for any component.
8080

8181
Getting Stack Traces with Symfony
@@ -92,7 +92,7 @@ from your development environment through a web browser:
9292

9393
1. Are there several exceptions? If yes, the most interesting one is
9494
often exception 1/n which, is shown *last* in the example below (it
95-
is the one marked as exception [1/2]).
95+
is the one marked as an exception [1/2]).
9696
2. Under the "Stack Traces" tab, you will find exceptions in plain
9797
text, so that you can easily share them in e.g. bug reports. Make
9898
sure to **remove any sensitive information** before doing so.
@@ -109,7 +109,7 @@ Since stack traces may contain sensitive data, they should not be
109109
exposed in production. Getting a stack trace from your production
110110
environment, although more involving, is still possible with solutions
111111
that include but are not limited to sending them to an email address
112-
with monolog.
112+
with Monolog.
113113

114114
Stack Traces in the CLI
115115
~~~~~~~~~~~~~~~~~~~~~~~

contributing/code/standards.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ short example containing most features described below::
7878
}
7979

8080
/**
81-
* Transforms the input given as first argument.
81+
* Transforms the input given as the first argument.
8282
*
8383
* @param bool|string $dummy Some argument description
8484
* @param array $options An options collection to be used within the transformation

0 commit comments

Comments
 (0)