Skip to content

Commit

Permalink
Correct spelling & grammar in 4.4 components/
Browse files Browse the repository at this point in the history
  • Loading branch information
gnito-org authored and javiereguiluz committed Dec 17, 2021
1 parent 62c0653 commit df23ae3
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions components/asset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Asset Component
The Asset component manages URL generation and versioning of web assets such
as CSS stylesheets, JavaScript files and image files.

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

.. code-block:: html
Expand Down Expand Up @@ -357,7 +357,7 @@ they all have different base paths::
$packages = new Packages($defaultPackage, $namedPackages);

The ``Packages`` class allows to define a default package, which will be applied
to assets that don't define the name of package to use. In addition, this
to assets that don't define the name of the package to use. In addition, this
application defines a package named ``img`` to serve images from an external
domain and a ``doc`` package to avoid repeating long paths when linking to a
document inside a template::
Expand Down
10 changes: 5 additions & 5 deletions components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ on the request's information.

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

Expand Down Expand Up @@ -358,7 +358,7 @@ of arguments that should be passed when executing that callable.
5) Calling the Controller
~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

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

Expand Down Expand Up @@ -692,7 +692,7 @@ Sub Requests
------------

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

Expand Down
2 changes: 1 addition & 1 deletion components/inflector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ forms::
Inflector::singularize('indices'); // ['index', 'indix', 'indice']
Inflector::singularize('leaves'); // ['leaf', 'leave', 'leaff']

Inflector::pluralize('matrix'); // ['matricies', 'matrixes']
Inflector::pluralize('matrix'); // ['matrices', 'matrixes']
Inflector::pluralize('person'); // ['persons', 'people']
24 changes: 12 additions & 12 deletions components/lock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ method will try to acquire the lock::

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

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

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

Expand All @@ -79,7 +79,7 @@ Serializing Locks

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

use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\Lock;
Expand Down Expand Up @@ -203,7 +203,7 @@ as seconds) and ``isExpired()`` (which returns a boolean).
Automatically Releasing The Lock
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

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

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

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

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

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

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

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

.. caution::

Expand All @@ -650,7 +650,7 @@ RedisStore

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

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

Combined stores allow to store locks across several backends. It's a common
Combined stores allow the storage of locks across several backends. It's a common
mistake to think that the lock mechanism will be more reliable. This is wrong.
The ``CombinedStore`` will be, at best, as reliable as the least reliable of
all managed stores. As soon as one managed store returns erroneous information,
Expand Down
4 changes: 2 additions & 2 deletions components/mime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ complexity to provide two ways of creating MIME messages:
* A high-level API based on the :class:`Symfony\\Component\\Mime\\Email` class
to quickly create email messages with all the common features;
* A low-level API based on the :class:`Symfony\\Component\\Mime\\Message` class
to have an absolute control over every single part of the email message.
to have absolute control over every single part of the email message.

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

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

Twig Integration
Expand Down
8 changes: 4 additions & 4 deletions components/options_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ if you need to use other options during normalization::
}
}

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

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

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

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

A previously set default value can be accessed by adding a second argument to
the closure::
Expand Down
4 changes: 2 additions & 2 deletions components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ with a non-zero code)::
Using Features From the OS Shell
--------------------------------

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion components/property_access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ properties through *adder* and *remover* methods::
The PropertyAccess component checks for methods called ``add<SingularOfThePropertyName>()``
and ``remove<SingularOfThePropertyName>()``. Both methods must be defined.
For instance, in the previous example, the component looks for the ``addChild()``
and ``removeChild()`` methods to access to the ``children`` property.
and ``removeChild()`` methods to access the ``children`` property.
`The Inflector component`_ is used to find the singular of a property name.

If available, *adder* and *remover* methods have priority over a *setter* method.
Expand Down
2 changes: 1 addition & 1 deletion components/property_info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ strings::
Example Result
--------------
string(79):
These is the subsequent paragraph in the DocComment.
This is the subsequent paragraph in the DocComment.
It can span multiple lines.
*/

Expand Down
4 changes: 2 additions & 2 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::

You can also implement
:class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface`
to access to the current class name, format and context.
to access the current class name, format and context.

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

Expand Down Expand Up @@ -882,7 +882,7 @@ Option Description D
and ``$options = ['csv_headers' => ['a', 'b', 'c']]``
then ``serialize($data, 'csv', $options)`` returns
``a,b,c\n1,2,3`` ``[]``, inferred from input data's keys
``csv_escape_formulas`` Escapes fields containg formulas by prepending them ``false``
``csv_escape_formulas`` Escapes fields containing formulas by prepending them ``false``
with a ``\t`` character
``as_collection`` Always returns results as a collection, even if only ``true``
one line is decoded.
Expand Down
2 changes: 1 addition & 1 deletion components/var_exporter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ any other methods::
Instances of ``ArrayObject``, ``ArrayIterator`` and ``SplObjectHash`` can be
created by using the special ``"\0"`` property name to define their internal value::

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

0 comments on commit df23ae3

Please sign in to comment.