Merge branch '4.4' into 5.3

* 4.4:
  Correct spelling & grammar in 4.4 testing.rst
  Correct spelling & grammar in 4.4 controller/
  Correct spelling & grammar in 4.4 configuration/
  Correct spelling & grammar in 4.4 components/yaml/
  Correct spelling & grammar in 4.4 components/security/
  Correct spelling & grammar in 4.4 components/http_foundation/
  Correct spelling & grammar in 4.4 components/cache/
  Correct spelling & grammar in 4.4 logging.rst
  Correct spelling & grammar in 4.4 lock.rst
  Correct spelling & grammar in 4.4 http_client.rst
  Correct spelling & grammar in 4.4 http_cache.rst
This commit is contained in:
Javier Eguiluz
2021-12-16 20:22:02 +01:00
15 changed files with 27 additions and 27 deletions

View File

@@ -7,7 +7,7 @@ PHP Array Cache Adapter
This adapter is a high performance cache for static data (e.g. application configuration)
that is optimized and preloaded into OPcache memory storage. It is suited for any data that
is mostly read-only after warmup::
is mostly read-only after warm-up::
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
@@ -23,7 +23,7 @@ is mostly read-only after warmup::
$cache = new PhpArrayAdapter(
// single file where values are cached
__DIR__ . '/somefile.cache',
// a backup adapter, if you set values after warmup
// a backup adapter, if you set values after warm-up
new FilesystemAdapter()
);
$cache->warmUp($values);

View File

@@ -205,7 +205,7 @@ try to add data when no memory is available. An example setting could look as fo
maxmemory 100mb
maxmemory-policy allkeys-lru
Read more about this topic in the offical `Redis LRU Cache Documentation`_.
Read more about this topic in the official `Redis LRU Cache Documentation`_.
.. _`Data Source Name (DSN)`: https://en.wikipedia.org/wiki/Data_source_name
.. _`Redis server`: https://redis.io/

View File

@@ -7,7 +7,7 @@ Cache Invalidation
Cache invalidation is the process of removing all cached items related to a
change in the state of your model. The most basic kind of invalidation is direct
items deletion. But when the state of a primary resource has spread across
item deletion. But when the state of a primary resource has spread across
several cached items, keeping them in sync can be difficult.
The Symfony Cache component provides two mechanisms to help solve this problem:
@@ -47,7 +47,7 @@ you can invalidate the cached items by calling
// if you know the cache key, you can also delete the item directly
$cache->delete('cache_key');
Using tags invalidation is very useful when tracking cache keys becomes difficult.
Using tag invalidation is very useful when tracking cache keys becomes difficult.
Tag Aware Adapters
~~~~~~~~~~~~~~~~~~

View File

@@ -53,7 +53,7 @@ Quick example::
.. caution::
Symfony sessions are incompatible with ``php.ini`` directive ``session.auto_start = 1``
This directive should be turned off in ``php.ini``, in the webserver directives or
This directive should be turned off in ``php.ini``, in the web server directives or
in ``.htaccess``.
Session API
@@ -152,7 +152,7 @@ the following API which is intended mainly for internal purposes:
Returns the name of the session bag.
:method:`Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface::clear`
Clears out data from bag.
Clears out data from the bag.
.. _attribute-bag-interface:
@@ -301,7 +301,7 @@ has the API
Gets flashes by type (read only).
:method:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface::peekAll`
Gets all flashes (read only) as keyed array of arrays.
Gets all flashes (read only) as a keyed array of arrays.
:method:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface::has`
Returns true if the type exists, false if not.

View File

@@ -299,7 +299,7 @@ Authentication Success and Failure Events
When a provider authenticates the user, a ``security.authentication.success``
event is dispatched. But beware - this event may fire, for example, on *every*
request if you have session-based authentication, if ``always_authenticate_before_granting``
is enabled or if token is not authenticated before AccessListener is invoked.
is enabled or if the token is not authenticated before AccessListener is invoked.
See ``security.interactive_login`` below if you need to do something when a user *actually* logs in.
When a provider attempts authentication but fails (i.e. throws an ``AuthenticationException``),
@@ -324,7 +324,7 @@ The ``security.switch_user`` event is triggered every time you activate
the ``switch_user`` firewall listener.
The ``Symfony\Component\Security\Http\Event\DeauthenticatedEvent`` event is triggered when a token has been deauthenticated
because of a user change, it can help you doing some clean-up task.
because of a user change. It can help you perform clean-up tasks.
.. seealso::

View File

@@ -25,7 +25,7 @@ they can also be unquoted:
A string in YAML
'A singled-quoted string in YAML'
'A single-quoted string in YAML'
"A double-quoted string in YAML"

View File

@@ -583,8 +583,8 @@ Symfony provides the following env var processors:
$container->setParameter('private_key', '%env(default:raw_key:file:PRIVATE_KEY)%');
$container->setParameter('raw_key', '%env(PRIVATE_KEY)%');
When the fallback parameter is omitted (e.g. ``env(default::API_KEY)``), the
value returned is ``null``.
When the fallback parameter is omitted (e.g. ``env(default::API_KEY)``), then the
returned value is ``null``.
``env(url:FOO)``
Parses an absolute URL and returns its components as an associative array.

View File

@@ -135,7 +135,7 @@ should run in "debug mode". Regardless of the
:ref:`configuration environment <configuration-environments>`, a Symfony
application can be run with debug mode set to ``true`` or ``false``.
This affects many things in the application, such as displaying stacktraces on
This affects many things in the application, such as displaying stack traces on
error pages or if cache files are dynamically rebuilt on each request. Though
not a requirement, debug mode is generally set to ``true`` for the ``dev`` and
``test`` environments and ``false`` for the ``prod`` environment.

View File

@@ -77,7 +77,7 @@ Now you need to define the ``ApiKernel`` class used by the new front controller.
The easiest way to do this is by duplicating the existing ``src/Kernel.php``
file and make the needed changes.
In this example, the ``ApiKernel`` will load less bundles than the default
In this example, the ``ApiKernel`` will load fewer bundles than the default
Kernel. Be sure to also change the location of the cache, logs and configuration
files so they don't collide with the files from ``src/Kernel.php``::

View File

@@ -95,7 +95,7 @@ buffering the STDOUT and use ``ob_get_clean()`` to dump the echoed output
into the content of the Response and clear the output buffer. Finally, you're
ready to return the ``Response``.
Below is an example calling the service using a native `SoapClient`_ client. This example
Below is an example of calling the service using a native `SoapClient`_ client. This example
assumes that the ``index()`` method in the controller above is accessible via
the route ``/soap``::

View File

@@ -71,7 +71,7 @@ Symfony Reverse Proxy
Symfony comes with a reverse proxy (i.e. gateway cache) written in PHP.
:ref:`It's not a fully-featured reverse proxy cache like Varnish <http-cache-symfony-versus-varnish>`,
but is a great way to start.
but it is a great way to start.
.. tip::

View File

@@ -1020,7 +1020,7 @@ response sequentially instead of waiting for the entire response::
``php://temp`` stream. You can control this behavior by using the ``buffer``
option: set it to ``true``/``false`` to enable/disable buffering, or to a
closure that should return the same based on the response headers it receives
as argument.
as an argument.
Canceling Responses
~~~~~~~~~~~~~~~~~~~
@@ -1190,7 +1190,7 @@ method will yield a special chunk whose ``isTimeout()`` will return ``true``::
foreach ($client->stream($responses, 1.5) as $response => $chunk) {
if ($chunk->isTimeout()) {
// $response staled for more than 1.5 seconds
// $response stale for more than 1.5 seconds
}
}

View File

@@ -8,7 +8,7 @@ When a program runs concurrently, some part of code which modify shared
resources should not be accessed by multiple processes at the same time.
Symfony's :doc:`Lock component </components/lock>` provides a locking mechanism to ensure
that only one process is running the critical section of code at any point of
time to prevent race condition from happening.
time to prevent race conditions from happening.
The following example shows a typical usage of the lock::
@@ -199,7 +199,7 @@ Locking a Dynamic Resource
--------------------------
Sometimes the application is able to cut the resource into small pieces in order
to lock a small subset of process and let other through. The previous example
to lock a small subset of processes and let others through. The previous example
showed how to lock the ``$pdf->getOrCreatePdf('terms-of-use')`` for everybody,
now let's see how to lock ``$pdf->getOrCreatePdf($version)`` only for
processes asking for the same ``$version``::

View File

@@ -165,7 +165,7 @@ defined.
If you want to override the ``monolog`` configuration via another config
file, you will need to redefine the entire ``handlers`` stack. The configuration
from the two files cannot be merged because the order matters and a merge does
not allow to control the order.
not allow you to control the order.
Handlers that Modify Log Entries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -29,7 +29,7 @@ After the library is installed, try running PHPUnit:
$ php ./vendor/bin/phpunit
This commands automatically runs your application's tests. Each test is a
This command automatically runs your application tests. Each test is a
PHP class ending with "Test" (e.g. ``BlogControllerTest``) that lives in
the ``tests/`` directory of your application.
@@ -147,7 +147,7 @@ usually defined in the ``KERNEL_CLASS`` environment variable
If your use case is more complex, you can also override the
``getKernelClass()`` or ``createKernel()`` methods of your functional
test, which take precedence over the ``KERNEL_CLASS`` env var.
test, which takes precedence over the ``KERNEL_CLASS`` env var.
Set-up your Test Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -378,7 +378,7 @@ generate an empty fixture class:
The class name of the fixtures to create (e.g. AppFixtures):
> ProductFixture
Then you modify use this class to load new entities in the database. For
Then you modify and use this class to load new entities in the database. For
instance, to load ``Product`` objects into Doctrine, use::
// src/DataFixtures/ProductFixture.php
@@ -911,7 +911,7 @@ Request Assertions
Asserts the given :ref:`request attribute <component-foundation-attributes>`
is set to the expected value.
``assertRouteSame($expectedRoute, array $parameters = [], string $message = '')``
Asserts the request matched the given route and optionally route parameters.
Asserts the request matches the given route and optionally route parameters.
Browser Assertions
..................
@@ -974,7 +974,7 @@ Mailer Assertions
``assertEmailAttachmentCount(RawMessage $email, int $count, string $message = '')``
Asserts that the given email has the expected number of attachments. Use
``getMailerMessage(int $index = 0, string $transport = null)`` to
retrievea specific email by index.
retrieve a specific email by index.
``assertEmailTextBodyContains(RawMessage $email, string $text, string $message = '')``/``assertEmailTextBodyNotContains(RawMessage $email, string $text, string $message = '')``
Asserts that the text body of the given email does (not) contain the
expected text.