From 534486b8408cd3874704d11cad1ee2149f2e2317 Mon Sep 17 00:00:00 2001 From: gnito-org <70450336+gnito-org@users.noreply.github.com> Date: Sat, 18 Dec 2021 08:35:27 -0400 Subject: [PATCH] Correct spelling & grammar in 5.3 --- cache.rst | 4 ++-- components/browser_kit.rst | 2 +- components/http_foundation.rst | 4 ++-- components/lock.rst | 4 ++-- components/messenger.rst | 2 +- components/phpunit_bridge.rst | 2 +- components/runtime.rst | 2 +- components/semaphore.rst | 4 ++-- components/string.rst | 2 +- components/uid.rst | 2 +- components/var_dumper.rst | 2 +- notifier.rst | 6 +++--- rate_limiter.rst | 14 +++++++------- security/custom_authenticator.rst | 6 +++--- security/login_link.rst | 4 ++-- security/passwords.rst | 4 ++-- security/remember_me.rst | 4 ++-- security/user_providers.rst | 2 +- service_container/autowiring.rst | 2 +- testing.rst | 2 +- validation/custom_constraint.rst | 4 ++-- 21 files changed, 39 insertions(+), 39 deletions(-) diff --git a/cache.rst b/cache.rst index 70c1a863103..9c3ed9ed88e 100644 --- a/cache.rst +++ b/cache.rst @@ -800,5 +800,5 @@ Then, register the ``SodiumMarshaller`` service using this key: When configuring multiple keys, the first key will be used for reading and writing, and the additional key(s) will only be used for reading. Once all -cache items encrypted with the old key have expired, you can remove -``OLD_CACHE_DECRYPTION_KEY`` completely. +cache items encrypted with the old key have expired, you can completely remove +``OLD_CACHE_DECRYPTION_KEY``. diff --git a/components/browser_kit.rst b/components/browser_kit.rst index 9648afc31e4..e7c05067185 100644 --- a/components/browser_kit.rst +++ b/components/browser_kit.rst @@ -185,7 +185,7 @@ Custom Header Handling The optional HTTP headers passed to the ``request()`` method follows the FastCGI request format (uppercase, underscores instead of dashes and prefixed with ``HTTP_``). Before saving those headers to the request, they are lower-cased, with ``HTTP_`` -stripped, and underscores turned to dashes. +stripped, and underscores converted into dashes. If you're making a request to an application that has special rules about header capitalization or punctuation, override the ``getHeaders()`` method, which must diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 6154119e715..1913f59f818 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -81,7 +81,7 @@ can be accessed via several public properties: (``$request->headers->get('User-Agent')``). Each property is a :class:`Symfony\\Component\\HttpFoundation\\ParameterBag` -instance (or a sub-class of), which is a data holder class: +instance (or a subclass of), which is a data holder class: * ``request``: :class:`Symfony\\Component\\HttpFoundation\\ParameterBag` or :class:`Symfony\\Component\\HttpFoundation\\InputBag` if the data is @@ -726,7 +726,7 @@ The ``JsonResponse`` class sets the ``Content-Type`` header to .. caution:: To avoid XSSI `JSON Hijacking`_, you should pass an associative array - as the outer-most array to ``JsonResponse`` and not an indexed array so + as the outermost array to ``JsonResponse`` and not an indexed array so that the final result is an object (e.g. ``{"object": "not inside an array"}``) instead of an array (e.g. ``[{"object": "inside an array"}]``). Read the `OWASP guidelines`_ for more information. diff --git a/components/lock.rst b/components/lock.rst index c10f86d1f3d..8f81b7cce59 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -210,7 +210,7 @@ as seconds) and ``isExpired()`` (which returns a boolean). Automatically Releasing The Lock ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Locks are automatically released when their Lock objects are destructed. This is +Locks are automatically released when their Lock objects are destroyed. 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:: @@ -508,7 +508,7 @@ locks:: $store = new PostgreSqlStore($databaseConnectionOrDSN); In opposite to the ``PdoStore``, the ``PostgreSqlStore`` does not need a table to -store locks and does not expire. +store locks and it does not expire. .. versionadded:: 5.2 diff --git a/components/messenger.rst b/components/messenger.rst index 7e1af990db1..2e853f69ab6 100644 --- a/components/messenger.rst +++ b/components/messenger.rst @@ -77,7 +77,7 @@ middleware stack. The component comes with a set of middleware that you can use. When using the message bus with Symfony's FrameworkBundle, the following middleware are configured for you: -#. :class:`Symfony\\Component\\Messenger\\Middleware\\SendMessageMiddleware` (enables asynchronous processing, logs the processing of your messages if you pass a logger) +#. :class:`Symfony\\Component\\Messenger\\Middleware\\SendMessageMiddleware` (enables asynchronous processing, logs the processing of your messages if you provide a logger) #. :class:`Symfony\\Component\\Messenger\\Middleware\\HandleMessageMiddleware` (calls the registered handler(s)) Example:: diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 7658acba17f..714157d1531 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -295,7 +295,7 @@ Baseline Deprecations If your application has some deprecations that you can't fix for some reasons, you can tell Symfony to ignore them. The trick is to create a file with the allowed deprecations and define it as the "deprecation baseline". Deprecations -inside that file are ignore but the rest of deprecations are still reported. +inside that file are ignored but the rest of deprecations are still reported. First, generate the file with the allowed deprecations (run the same command whenever you want to update the existing file): diff --git a/components/runtime.rst b/components/runtime.rst index e716ec6eb38..f9d76bff0c5 100644 --- a/components/runtime.rst +++ b/components/runtime.rst @@ -383,7 +383,7 @@ application outside of the global state in 6 steps: that knows how to "run" the application object. #. The ``RunnerInterface::run(object $application)`` is called and it returns the exit status code as `int`. -#. The PHP engine is exited with this status code. +#. The PHP engine is terminated with this status code. When creating a new runtime, there are two things to consider: First, what arguments will the end user use? Second, what will the user's application look like? diff --git a/components/semaphore.rst b/components/semaphore.rst index ebae3df89e8..810d12f76d2 100644 --- a/components/semaphore.rst +++ b/components/semaphore.rst @@ -45,7 +45,7 @@ class, which in turn requires another class to manage the storage:: The semaphore is created by calling the :method:`Symfony\\Component\\Semaphore\\SemaphoreFactory::createSemaphore` method. Its first argument is an arbitrary string that represents the locked -resource. Its second argument is the maximum number of process allowed. Then, a +resource. Its second argument is the maximum number of processes allowed. Then, a call to the :method:`Symfony\\Component\\Semaphore\\SemaphoreInterface::acquire` method will try to acquire the semaphore:: @@ -54,7 +54,7 @@ method will try to acquire the semaphore:: if ($semaphore->acquire()) { // The resource "pdf-invoice-generation" is locked. - // You can compute and generate invoice safely here. + // Here you can safely compute and generate the invoice. $semaphore->release(); } diff --git a/components/string.rst b/components/string.rst index 48f17f0b3e9..f754bfdb7ea 100644 --- a/components/string.rst +++ b/components/string.rst @@ -36,7 +36,7 @@ However, other languages require thousands of symbols to display their contents. They need complex encoding standards such as `Unicode`_ and concepts like "character" no longer make sense. Instead, you have to deal with these terms: -* `Code points`_: they are the atomic unit of information. A string is a series +* `Code points`_: they are the atomic units of information. A string is a series of code points. Each code point is a number whose meaning is given by the `Unicode`_ standard. For example, the English letter ``A`` is the ``U+0041`` code point and the Japanese *kana* ``の`` is the ``U+306E`` code point. diff --git a/components/uid.rst b/components/uid.rst index d6b3692be45..c0fdb8822e3 100644 --- a/components/uid.rst +++ b/components/uid.rst @@ -331,7 +331,7 @@ type, which converts to/from ULID objects automatically:: // ... } -There's also a Doctrine generator to help autogenerate ULID values for the +There's also a Doctrine generator to help auto-generate ULID values for the entity primary keys:: use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator; diff --git a/components/var_dumper.rst b/components/var_dumper.rst index b661bd7a44a..fc64d5607b7 100644 --- a/components/var_dumper.rst +++ b/components/var_dumper.rst @@ -258,7 +258,7 @@ option. Read more about this and other options in finished, press ``Esc.`` to hide the box again. If you want to use your browser search input, press ``Ctrl. + F`` or - ``Cmd. + F`` again while having focus on VarDumper's search input. + ``Cmd. + F`` again while focusing on VarDumper's search input. Using the VarDumper Component in your PHPUnit Test Suite -------------------------------------------------------- diff --git a/notifier.rst b/notifier.rst index 0280a04f8ad..7d12e04386f 100644 --- a/notifier.rst +++ b/notifier.rst @@ -39,7 +39,7 @@ The notifier component supports the following channels: .. tip:: - Use :doc:`secrets ` to securily store your + Use :doc:`secrets ` to securely store your API's tokens. .. _notifier-sms-channel: @@ -422,10 +422,10 @@ Symfony provides the following recipients: :class:`Symfony\\Component\\Notifier\\Recipient\\NoRecipient` This is the default and is useful when there is no need to have information about the receiver. For example, the browser channel uses - the current requests's :ref:`session flashbag `; + the current requests' :ref:`session flashbag `; :class:`Symfony\\Component\\Notifier\\Recipient\\Recipient` - This can contain both email address and phonenumber of the user. This + This can contain both the email address and the phone number of the user. This recipient can be used for all channels (depending on whether they are actually set). diff --git a/rate_limiter.rst b/rate_limiter.rst index 4f2d20b2b18..676d16f0a99 100644 --- a/rate_limiter.rst +++ b/rate_limiter.rst @@ -50,7 +50,7 @@ squares). Its main drawback is that resource usage is not evenly distributed in time and it can overload the server at the window edges. In the previous example, -there are 6 accepted requests between 11:00 and 12:00. +there were 6 accepted requests between 11:00 and 12:00. This is more significant with bigger limits. For instance, with 5,000 requests per hour, a user could make the 4,999 requests in the last minute of some @@ -80,15 +80,15 @@ the previous hour and 500 requests this hour. 15 minutes in to the current hour (25% of the window) the hit count would be calculated as: 75% * 4,000 + 500 = 3,500. At this point in time the user can only do 1,500 more requests. -The math shows that the closer the last window is, the more will the hit count -of the last window effect the current limit. This will make sure that a user can -do 5,000 requests per hour but only if they are spread out evenly. +The math shows that the closer the last window is, the more the hit count +of the last window will affect the current limit. This will make sure that a user can +do 5,000 requests per hour but only if they are evenly spread out. Token Bucket Rate Limiter ~~~~~~~~~~~~~~~~~~~~~~~~~ -This technique implements the `token bucket algorithm`_, which defines a -continuously updating budget of resource usage. It roughly works like this: +This technique implements the `token bucket algorithm`_, which defines +continuously updating the budget of resource usage. It roughly works like this: * A bucket is created with an initial set of tokens; * A new token is added to the bucket with a predefined frequency (e.g. every second); @@ -103,7 +103,7 @@ of 1 token per 15 minutes: -This algorithm handles more complex back-off algorithm to manage bursts. +This algorithm handles more complex back-off burst management. For instance, it can allow a user to try a password 5 times and then only allow 1 every 15 minutes (unless the user waits 75 minutes and they will be allowed 5 tries again). diff --git a/security/custom_authenticator.rst b/security/custom_authenticator.rst index 03f5820cec3..cd18e7bbd81 100644 --- a/security/custom_authenticator.rst +++ b/security/custom_authenticator.rst @@ -4,7 +4,7 @@ How to Write a Custom Authenticator Symfony comes with :ref:`many authenticators ` and third party bundles also implement more complex cases like JWT and oAuth 2.0. However, sometimes you need to implement a custom authentication -mechanism that doesn't exists yet or you need to customize one. In such +mechanism that doesn't exist yet or you need to customize one. In such cases, you must create and use your own authenticator. Authenticators should implement the @@ -133,7 +133,7 @@ The authenticator can be enabled using the ``custom_authenticators`` setting: .. versionadded:: 5.2 Starting with Symfony 5.2, the custom authenticator is automatically - registered as entry point if it implements ``AuthenticationEntryPointInterface``. + registered as an entry point if it implements ``AuthenticationEntryPointInterface``. Prior to 5.2, you had to configure the entry point separately using the ``entry_point`` option. Read :doc:`/security/entry_point` for more @@ -171,7 +171,7 @@ can define what happens in these cases: **Caution**: Never use ``$exception->getMessage()`` for ``AuthenticationException`` instances. This message might contain sensitive information that you - don't want to expose publicly. Instead, use ``$exception->getMessageKey()`` + don't want to be publicly exposed. Instead, use ``$exception->getMessageKey()`` and ``$exception->getMessageData()`` like shown in the full example above. Use :class:`Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAuthenticationException` if you want to set custom error messages. diff --git a/security/login_link.rst b/security/login_link.rst index 86406f9b316..045c9a7963f 100644 --- a/security/login_link.rst +++ b/security/login_link.rst @@ -219,7 +219,7 @@ this interface:: {% endblock %} -In this controller, the user is submitting their e-mail address to the +In this controller, the user is submitting their email address to the controller. Based on this property, the correct user is loaded and a login link is created using :method:`Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandlerInterface::createLoginLink`. @@ -235,7 +235,7 @@ link is created using 3) Send the Login Link to the User ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Now the link is created, it needs to be send to the user. Anyone with the +Now the link is created, it needs to be sent to the user. Anyone with the link is able to login as this user, so you need to make sure to send it to a known device of them (e.g. using e-mail or SMS). diff --git a/security/passwords.rst b/security/passwords.rst index 521be799277..7f1f5b605b8 100644 --- a/security/passwords.rst +++ b/security/passwords.rst @@ -448,7 +448,7 @@ password should be stored: * :ref:`When using Doctrine's entity user provider ` * :ref:`When using a custom user provider ` -After this, you're done and passwords are always hashed as secure as possible! +After this, you're done and passwords are always hashed as securely as possible! .. note:: @@ -755,7 +755,7 @@ The Sodium Password Hasher ~~~~~~~~~~~~~~~~~~~~~~~~~~ It uses the `Argon2 key derivation function`_. Argon2 support was introduced -in PHP 7.2 by bundeling the `libsodium`_ extension. +in PHP 7.2 by bundling the `libsodium`_ extension. The hashed passwords are ``96`` characters long, but due to the hashing requirements saved in the resulting hash this may change in the future, so make diff --git a/security/remember_me.rst b/security/remember_me.rst index b14b012202f..f9fd2e62dab 100644 --- a/security/remember_me.rst +++ b/security/remember_me.rst @@ -135,7 +135,7 @@ The ``remember_me`` firewall defines the following configuration options: ``service`` (default value: ``null``) Defines the ID of the service used to handle the Remember Me feature. It's - useful if you need to overwrite the current behavior entirely. + useful if you need to overwrite the current behavior. .. versionadded:: 5.1 @@ -204,7 +204,7 @@ users to change their password. You can do this by leveraging a few special .. tip:: - There is also a ``IS_REMEMBERED`` attribute that grants *only* when the + There is also a ``IS_REMEMBERED`` attribute that grants access *only* when the user is authenticated via the remember me mechanism. .. versionadded:: 5.1 diff --git a/security/user_providers.rst b/security/user_providers.rst index 5d3be052121..07212acbf0b 100644 --- a/security/user_providers.rst +++ b/security/user_providers.rst @@ -104,7 +104,7 @@ Using a Custom Query to Load the User The entity provider can only query from one *specific* field, specified by the ``property`` config key. If you want a bit more control over this - e.g. you want to find a user by ``email`` *or* ``username``, you can do that by -implenting :class:`Symfony\\Bridge\\Doctrine\\Security\\User\\UserLoaderInterface` +implementing :class:`Symfony\\Bridge\\Doctrine\\Security\\User\\UserLoaderInterface` in your :ref:`Doctrine repository ` (e.g. ``UserRepository``):: // src/Repository/UserRepository.php diff --git a/service_container/autowiring.rst b/service_container/autowiring.rst index a7407f51b1d..aa5d25ad83b 100644 --- a/service_container/autowiring.rst +++ b/service_container/autowiring.rst @@ -611,7 +611,7 @@ you can use the ``@required`` annotation instead. The ``#[Required]`` attribute was introduced in Symfony 5.2. -Despite property injection has some :ref:`drawbacks `, +Despite property injection having some :ref:`drawbacks `, autowiring with ``#[Required]`` or ``@required`` can also be applied to public typed properties: diff --git a/testing.rst b/testing.rst index 5390b7aefd8..4147ab361a0 100644 --- a/testing.rst +++ b/testing.rst @@ -583,7 +583,7 @@ Logging in Users (Authentication) When you want to add application tests for protected pages, you have to first "login" as a user. Reproducing the actual steps - such as -submitting a login form - make a test very slow. For this reason, Symfony +submitting a login form - makes a test very slow. For this reason, Symfony provides a ``loginUser()`` method to simulate logging in in your functional tests. diff --git a/validation/custom_constraint.rst b/validation/custom_constraint.rst index f462c773e74..41753fc02c0 100644 --- a/validation/custom_constraint.rst +++ b/validation/custom_constraint.rst @@ -232,8 +232,8 @@ with the necessary ``validator.constraint_validator``. This means you can Create a Reusable Set of Constraints ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In case you need to apply some common set of constraints in different places -consistently across your application, you can extend the :doc:`Compound constraint `. +In case you need to consistently apply a common set of constraints +across your application, you can extend the :doc:`Compound constraint `. .. versionadded:: 5.1