8000 Correct spelling & grammar in 4.4 components/ · symfony/symfony-docs@df23ae3 · GitHub
[go: up one dir, main page]

Skip to content

Commit df23ae3

Browse files
gnito-orgjaviereguiluz
authored andcommitted
Correct spelling & grammar in 4.4 components/
1 parent 62c0653 commit df23ae3

File tree

11 files changed

+33
-33
lines changed

11 files changed

+33
-33
lines changed

components/asset.rst

Lines changed: 2 additions & 2 deletions
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
@@ -357,7 +357,7 @@ they all have different base paths::
357357
$packages = new Packages($defaultPackage, $namedPackages);
358358

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

components/http_kernel.rst

Lines changed: 5 additions & 5 deletions
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
EDBE
@@ -602,7 +602,7 @@ on creating and attaching event listeners, see :doc:`/components/event_dispatche
602602

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

@@ -692,7 +692,7 @@ Sub Requests
692692
------------
693693

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

components/inflector.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ forms::
6060
Inflector::singularize('indices'); // ['index', 'indix', 'indice']
6161
Inflector::singularize('leaves'); // ['leaf', 'leave', 'leaff']
6262

63-
Inflector::pluralize('matrix'); // ['matricies', 'matrixes']
63+
Inflector::pluralize('matrix'); // ['matrices', 'matrixes']
6464
Inflector::pluralize('person'); // ['persons', 'people']

components/lock.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ method will try to acquire the lock::
5151

5252
if ($lock->acquire()) {
5353
// The resource "pdf-invoice-generation" is locked.
54-
// You can compute and generate invoice safely here.
54+
// You can compute and generate the invoice safely here.
5555

5656
$lock->release();
5757
}
@@ -70,7 +70,7 @@ method can be safely called repeatedly, even if the lock is already acquired.
7070
.. tip::
7171

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

@@ -79,7 +79,7 @@ Serializing Locks
7979

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

8484
use Symfony\Component\Lock\Key;
8585
use Symfony\Component\Lock\Lock;
@@ -203,7 +203,7 @@ as seconds) and ``isExpired()`` (which returns a boolean).
203203
Automatically Releasing The Lock
204204
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205205

206-
Lock are automatically released when their Lock objects are destructed. This is
206+
Locks are automatically released when their Lock objects are destructed. This is
207207
an implementation detail that will be important when sharing Locks between
208208
processes. In the example below, ``pcntl_fork()`` creates two processes and the
209209
Lock will be released automatically as soon as one process finishes::
@@ -555,11 +555,11 @@ FlockStore
555555
~~~~~~~~~~
556556

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

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

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

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

576576
By definition, usage of ``FlockStore`` in an HTTP context is incompatible
577577
with multiple front servers, unless to ensure that the same resource will
@@ -593,7 +593,7 @@ MemcachedStore
593593

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

598598
If the Memcached service or the machine hosting it restarts, every lock would
599599
be lost without notifying the running processes.
@@ -629,7 +629,7 @@ The PdoStore relies on the `ACID`_ properties of the SQL engine.
629629
.. caution::
630630

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

634634
.. caution::
635635

@@ -650,7 +650,7 @@ RedisStore
650650

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

655655
If the Redis service or the machine hosting it restarts, every locks would
656656
be lost without notifying the running processes.
@@ -677,7 +677,7 @@ removed by mistake.
677677
CombinedStore
678678
~~~~~~~~~~~~~
679679

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

components/mime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ complexity to provide two ways of creating MIME messages:
3838
* A high-level API based on the :class:`Symfony\\Component\\Mime\\Email` class
3939
to quickly create email messages with all the common features;
4040
* A low-level API based on the :class:`Symfony\\Component\\Mime\\Message` class
41-
to have an absolute control over every single part of the email message.
41+
to have absolute control over every single part of the email message.
4242

4343
Usage
4444
-----
@@ -60,7 +60,7 @@ methods to compose the entire email message::
6060
->html('<h1>Lorem ipsum</h1> <p>...</p>')
6161
;
6262

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

6666
Twig Integration

components/options_resolver.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ if you need to use other options during normalization::
434434
}
435435
}
436436

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

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

458458
use Symfony\Component\OptionsResolver\Options;
@@ -484,7 +484,7 @@ these options, you can return the desired default value::
484484
.. note::
485485

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

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

components/process.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ with a non-zero code)::
110110
Using Features From the OS Shell
111111
--------------------------------
112112

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

@@ -325,7 +325,7 @@ provides the :class:`Symfony\\Component\\Process\\InputStream` class::
325325
echo $process->getOutput();
326326

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

components/property_access.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ properties through *adder* and *remover* methods::
390390
The PropertyAccess component checks for methods called ``add<SingularOfThePropertyName>()``
391391
and ``remove<SingularOfThePropertyName>()``. Both methods must be defined.
392392
For instance, in the previous example, the component looks for the ``addChild()``
393-
and ``removeChild()`` methods to access to the ``children`` property.
393+
and ``removeChild()`` methods to access the ``children`` property.
394394
`The Inflector component`_ is used to find the singular of a property name.
395395

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

components/property_info.rst

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
515515

516516
You can also implement
517517
:class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface`
518-
to access to the current class name, format and context.
518+
to access the current class name, format and context.
519519

520520
.. _using-camelized-method-names-for-underscored-attributes:
521521

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

components/var_exporter.rst

Lines changed: 1 addition & 1 deletion
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
]);

0 commit comments

Comments
 (0)
0