From df23ae3a08061fb06479f9b26831ec9246424637 Mon Sep 17 00:00:00 2001 From: gnito-org <70450336+gnito-org@users.noreply.github.com> Date: Tue, 14 Dec 2021 13:24:46 -0400 Subject: [PATCH] Correct spelling & grammar in 4.4 components/ --- components/asset.rst | 4 ++-- components/http_kernel.rst | 10 +++++----- components/inflector.rst | 2 +- components/lock.rst | 24 ++++++++++++------------ components/mime.rst | 4 ++-- components/options_resolver.rst | 8 ++++---- components/process.rst | 4 ++-- components/property_access.rst | 2 +- components/property_info.rst | 2 +- components/serializer.rst | 4 ++-- components/var_exporter.rst | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/components/asset.rst b/components/asset.rst index 6aab732333f..5be1003ef15 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -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 @@ -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:: diff --git a/components/http_kernel.rst b/components/http_kernel.rst index ac2733058e0..0bdb8c24b2f 100644 --- a/components/http_kernel.rst +++ b/components/http_kernel.rst @@ -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``. @@ -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 @@ -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: @@ -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 @@ -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. diff --git a/components/inflector.rst b/components/inflector.rst index 5e9f4325884..960cb04d4ba 100644 --- a/components/inflector.rst +++ b/components/inflector.rst @@ -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'] diff --git a/components/lock.rst b/components/lock.rst index 3789cb5d22a..60b53a3a906 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -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(); } @@ -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``. @@ -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; @@ -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:: @@ -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 @@ -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 @@ -593,7 +593,7 @@ MemcachedStore The way Memcached works is to store items in memory. That means that by using the :ref:`MemcachedStore ` 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. @@ -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:: @@ -650,7 +650,7 @@ RedisStore The way Redis works is to store items in memory. That means that by using the :ref:`RedisStore ` 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. @@ -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, diff --git a/components/mime.rst b/components/mime.rst index 9f6b0aaec92..965c7a377ae 100644 --- a/components/mime.rst +++ b/components/mime.rst @@ -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 ----- @@ -60,7 +60,7 @@ methods to compose the entire email message:: ->html('

Lorem ipsum

...

') ; -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 ` to actually send them. Twig Integration diff --git a/components/options_resolver.rst b/components/options_resolver.rst index 7fda38acc07..4d556d86fda 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -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. @@ -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; @@ -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:: diff --git a/components/process.rst b/components/process.rst index 0a53b021c91..d8d585fe987 100644 --- a/components/process.rst +++ b/components/process.rst @@ -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):: @@ -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. diff --git a/components/property_access.rst b/components/property_access.rst index 285f9d24b83..f9375516cf8 100644 --- a/components/property_access.rst +++ b/components/property_access.rst @@ -390,7 +390,7 @@ properties through *adder* and *remover* methods:: The PropertyAccess component checks for methods called ``add()`` and ``remove()``. 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. diff --git a/components/property_info.rst b/components/property_info.rst index d8e3a693b12..8d86663c140 100644 --- a/components/property_info.rst +++ b/components/property_info.rst @@ -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. */ diff --git a/components/serializer.rst b/components/serializer.rst index 3e7da6c8b0b..b36f61fba0a 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -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: @@ -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. diff --git a/components/var_exporter.rst b/components/var_exporter.rst index 2e9ab500169..59f5ec64fab 100644 --- a/components/var_exporter.rst +++ b/components/var_exporter.rst @@ -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...], ]);