From 97f4eebf06cffad93f9084a83f44050f6624518b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 30 Jun 2019 01:39:59 +0200 Subject: [PATCH] Fix many typos and improve grammar --- _build/maintainer_guide.rst | 2 +- best_practices/controllers.rst | 4 ++-- best_practices/i18n.rst | 2 +- best_practices/introduction.rst | 2 +- bundles/configuration.rst | 2 +- components/asset.rst | 4 ++-- components/cache.rst | 4 ++-- components/cache/adapters/memcached_adapter.rst | 2 +- components/cache/cache_invalidation.rst | 2 +- components/cache/cache_items.rst | 2 +- components/cache/cache_pools.rst | 2 +- components/class_loader.rst | 2 +- components/config/definition.rst | 6 +++--- components/console/helpers/table.rst | 2 +- components/dependency_injection/compilation.rst | 2 +- components/event_dispatcher.rst | 2 +- .../event_dispatcher/container_aware_dispatcher.rst | 2 +- components/filesystem/lock_handler.rst | 2 +- components/http_foundation/session_php_bridge.rst | 3 +-- components/serializer.rst | 4 ++-- components/translation/usage.rst | 4 ++-- components/var_dumper/advanced.rst | 4 ++-- components/yaml.rst | 8 ++++---- configuration/external_parameters.rst | 2 +- configuration/using_parameters_in_dic.rst | 2 +- console/commands_as_services.rst | 2 +- contributing/code/pull_requests.rst | 2 +- contributing/code/reproducer.rst | 2 +- contributing/code/standards.rst | 2 +- contributing/code_of_conduct/reporting_guidelines.rst | 2 +- contributing/documentation/standards.rst | 2 +- create_framework/front_controller.rst | 2 +- create_framework/http_kernel_controller_resolver.rst | 2 +- create_framework/separation_of_concerns.rst | 2 +- deployment/azure-website.rst | 2 +- event_dispatcher.rst | 2 +- form/create_custom_field_type.rst | 4 ++-- form/data_transformers.rst | 2 +- form/dynamic_form_modification.rst | 2 +- form/embedded.rst | 2 +- form/form_customization.rst | 8 ++++---- form/form_themes.rst | 4 ++-- frontend/assetic/uglifyjs.rst | 2 +- frontend/encore/installation.rst | 2 +- http_cache.rst | 2 +- logging/channels_handlers.rst | 2 +- profiler/storage.rst | 2 +- reference/configuration/doctrine.rst | 2 +- reference/configuration/framework.rst | 8 ++++---- reference/configuration/security.rst | 10 +++++----- reference/configuration/web_profiler.rst | 8 ++++---- reference/forms/twig_reference.rst | 2 +- .../forms/types/options/_error_bubbling_hint.rst.inc | 2 +- .../forms/types/options/checkbox_compound.rst.inc | 2 +- reference/forms/types/options/required.rst.inc | 2 +- .../forms/types/options/select_how_rendered.rst.inc | 2 +- reference/forms/types/tel.rst | 2 +- routing.rst | 2 +- routing/hostname_pattern.rst | 4 ++-- security/acl.rst | 4 ++-- security/entity_provider.rst | 2 +- session/locale_sticky_session.rst | 2 +- templating.rst | 4 ++-- testing.rst | 2 +- testing/insulating_clients.rst | 2 +- translation/debug.rst | 2 +- 66 files changed, 95 insertions(+), 96 deletions(-) diff --git a/_build/maintainer_guide.rst b/_build/maintainer_guide.rst index 7fb3e69ece8..fd3de4f3f3b 100644 --- a/_build/maintainer_guide.rst +++ b/_build/maintainer_guide.rst @@ -93,7 +93,7 @@ interface. Then: Merging Process ~~~~~~~~~~~~~~~ -At first it's common to make mistakes and merge things badly. Don't worry. This +At first, it's common to make mistakes and merge things badly. Don't worry. This has happened to all of us and we've always been able to recover from any mistake. Step 1: Select the right branch to merge diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index a4493702797..8eab4f822ad 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -6,8 +6,8 @@ means that controllers should hold just the thin layer of *glue-code* needed to coordinate the different parts of the application. As a rule of thumb, you should follow the 5-10-20 rule, where controllers should -only define 5 variables or less, contain 10 actions or less and include 20 lines -of code or less in each action. This isn't an exact science, but it should +only define 5 variables or fewer, contain 10 actions or fewer and include 20 lines +of code or fewer in each action. This isn't an exact science, but it should help you realize when code should be refactored out of the controller and into a service. diff --git a/best_practices/i18n.rst b/best_practices/i18n.rst index 06bec2b8cbb..57f3c1c94de 100644 --- a/best_practices/i18n.rst +++ b/best_practices/i18n.rst @@ -54,7 +54,7 @@ Traditionally, Symfony developers have created these files in the ``app/Resources/`` directory is considered the global location for the application's resources, storing translations in ``app/Resources/translations/`` centralizes them *and* gives them priority over any other translation file. -This let's you override translations defined in third-party bundles. +This lets you override translations defined in third-party bundles. Translation Keys ---------------- diff --git a/best_practices/introduction.rst b/best_practices/introduction.rst index 63ae1319d0d..cb510c34462 100644 --- a/best_practices/introduction.rst +++ b/best_practices/introduction.rst @@ -25,7 +25,7 @@ that fit the philosophy of the framework as envisioned by its original creator .. note:: - **Best practice** is a noun that means *"a well defined procedure that is + **Best practice** is a noun that means *"a well-defined procedure that is known to produce near-optimum results"*. And that's exactly what this guide aims to provide. Even if you don't agree with every recommendation, we believe these will help you build great applications with less complexity. diff --git a/bundles/configuration.rst b/bundles/configuration.rst index d594dbec292..b16d2f75e82 100644 --- a/bundles/configuration.rst +++ b/bundles/configuration.rst @@ -390,7 +390,7 @@ Providing an XML Schema XML has a very useful feature called `XML schema`_. This allows you to describe all possible elements and attributes and their values in an XML Schema -Definition (an xsd file). This XSD file is used by IDEs for auto completion and +Definition (an XSD file). This XSD file is used by IDEs for auto completion and it is used by the Config component to validate the elements. In order to use the schema, the XML configuration file must provide an diff --git a/components/asset.rst b/components/asset.rst index f2255cdfedc..bdc856c4ba6 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -30,7 +30,7 @@ simple. Hardcoding URLs can be a disadvantage because: is essential for some applications because it allows you to control how the assets are cached. The Asset component allows you to define different versioning strategies for each package; -* **Moving assets location** is cumbersome and error-prone: it requires you to +* **Moving assets' location** is cumbersome and error-prone: it requires you to carefully update the URLs of all assets included in all templates. The Asset component allows to move assets effortlessly just by changing the base path value associated with the package of assets; @@ -302,7 +302,7 @@ constructor:: // result: http://static2.example.com/images/icon.png?v1 For each asset, one of the URLs will be randomly used. But, the selection -is deterministic, meaning that each asset will be always served by the same +is deterministic, meaning that each asset will always be served by the same domain. This behavior simplifies the management of HTTP cache. Request Context Aware Assets diff --git a/components/cache.rst b/components/cache.rst index 43dcc370190..88c51941075 100644 --- a/components/cache.rst +++ b/components/cache.rst @@ -70,7 +70,7 @@ Now you can create, retrieve, update and delete items using this object:: // retrieve the cache item if (!$cache->has('stats.products_count')) { - // ... item does not exists in the cache + // ... item does not exist in the cache } // retrieve the value stored by the item @@ -171,7 +171,7 @@ Now you can create, retrieve, update and delete items using this cache pool:: // retrieve the cache item $productsCount = $cache->getItem('stats.products_count'); if (!$productsCount->isHit()) { - // ... item does not exists in the cache + // ... item does not exist in the cache } // retrieve the value stored by the item $total = $productsCount->get(); diff --git a/components/cache/adapters/memcached_adapter.rst b/components/cache/adapters/memcached_adapter.rst index 10f2b43aee2..d1f666f6321 100644 --- a/components/cache/adapters/memcached_adapter.rst +++ b/components/cache/adapters/memcached_adapter.rst @@ -240,7 +240,7 @@ Available Options ``server_failure_limit`` (type: ``int``, default: ``0``) Specifies the failure limit for server connection attempts before marking - the server as "dead". The server will remaining in the server pool unless + the server as "dead". The server will remain in the server pool unless ``auto_eject_hosts`` is enabled. Valid option values include *any positive integer*. diff --git a/components/cache/cache_invalidation.rst b/components/cache/cache_invalidation.rst index e2bb8a8ce0c..9deefa6851f 100644 --- a/components/cache/cache_invalidation.rst +++ b/components/cache/cache_invalidation.rst @@ -10,7 +10,7 @@ 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 several cached items, keeping them in sync can be difficult. -The Symfony Cache component provides two mechanisms to help solving this problem: +The Symfony Cache component provides two mechanisms to help solve this problem: * :ref:`Tags-based invalidation ` for managing data dependencies; * :ref:`Expiration based invalidation ` for time related dependencies. diff --git a/components/cache/cache_items.rst b/components/cache/cache_items.rst index a9c0246ea75..16eec288afe 100644 --- a/components/cache/cache_items.rst +++ b/components/cache/cache_items.rst @@ -58,7 +58,7 @@ corresponding *getter* methods:: Cache Item Expiration ~~~~~~~~~~~~~~~~~~~~~ -By default cache items are stored permanently. In practice, this "permanent +By default, cache items are stored permanently. In practice, this "permanent storage" can vary greatly depending on the type of cache being used, as explained in the :doc:`/components/cache/cache_pools` article. diff --git a/components/cache/cache_pools.rst b/components/cache/cache_pools.rst index 57a4fe33337..dd200eaf674 100644 --- a/components/cache/cache_pools.rst +++ b/components/cache/cache_pools.rst @@ -16,7 +16,7 @@ Cache Pools and Supported Adapters Cache Pools are the logical repositories of cache items. They perform all the common operations on items, such as saving them or looking for them. Cache pools -are independent from the actual cache implementation. Therefore, applications +are independent of the actual cache implementation. Therefore, applications can keep using the same cache pool even if the underlying cache mechanism changes from a file system based cache to a Redis or database based cache. diff --git a/components/class_loader.rst b/components/class_loader.rst index 156c2d64f78..877c4bf548d 100644 --- a/components/class_loader.rst +++ b/components/class_loader.rst @@ -9,7 +9,7 @@ The ClassLoader Component .. caution:: - The ClassLoader component was deprecated in Symfony 3.3 and it will be + The ClassLoader component was deprecated in Symfony 3.3 and will be removed in 4.0. As an alternative, use any of the `class loading optimizations`_ provided by Composer. diff --git a/components/config/definition.rst b/components/config/definition.rst index ce426801c2d..c6353644b88 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -538,7 +538,7 @@ For all nodes: Appending Sections ------------------ -If you have a complex configuration to validate then the tree can grow to +If you have a complex configuration to validate, then the tree can grow to be large and you may want to split it up into sections. You can do this by making a section a separate node and then appending it into the main tree with ``append()``:: @@ -711,8 +711,8 @@ and sometimes only: default -By default ``connection`` would be an array in the first case and a string -in the second making it difficult to validate. You can ensure it is always +By default, ``connection`` would be an array in the first case and a string +in the second, making it difficult to validate. You can ensure it is always an array with ``fixXmlConfig()``. You can further control the normalization process if you need to. For example, diff --git a/components/console/helpers/table.rst b/components/console/helpers/table.rst index 59fc63f5992..0694a5a468a 100644 --- a/components/console/helpers/table.rst +++ b/components/console/helpers/table.rst @@ -69,7 +69,7 @@ You can add a table separator anywhere in the output by passing an instance of | 80-902734-1-6 | And Then There Were None | Agatha Christie | +---------------+--------------------------+------------------+ -By default the width of the columns is calculated automatically based on their +By default, the width of the columns is calculated automatically based on their contents. Use the :method:`Symfony\\Component\\Console\\Helper\\Table::setColumnWidths` method to set the column widths explicitly:: diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index 38496476f55..bd2ea7d286e 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -473,7 +473,7 @@ makes dumping the compiled container easy:: } ``ProjectServiceContainer`` is the default name given to the dumped container -class. However you can change this with the ``class`` option when you +class. However, you can change this with the ``class`` option when you dump it:: // ... diff --git a/components/event_dispatcher.rst b/components/event_dispatcher.rst index 36e828b23b0..33353cc9684 100644 --- a/components/event_dispatcher.rst +++ b/components/event_dispatcher.rst @@ -13,7 +13,7 @@ Introduction ------------ Object-oriented code has gone a long way to ensuring code extensibility. -By creating classes that have well defined responsibilities, your code becomes +By creating classes that have well-defined responsibilities, your code becomes more flexible and a developer can extend them with subclasses to modify their behaviors. But if they want to share the changes with other developers who have also made their own subclasses, code inheritance is no longer the diff --git a/components/event_dispatcher/container_aware_dispatcher.rst b/components/event_dispatcher/container_aware_dispatcher.rst index aca590c2d32..a2d5e29a96a 100644 --- a/components/event_dispatcher/container_aware_dispatcher.rst +++ b/components/event_dispatcher/container_aware_dispatcher.rst @@ -7,7 +7,7 @@ The Container Aware Event Dispatcher .. deprecated:: 3.3 The ``ContainerAwareEventDispatcher`` class has been deprecated in Symfony 3.3 - and it will be removed in Symfony 4.0. Use ``EventDispatcher`` with + and will be removed in Symfony 4.0. Use ``EventDispatcher`` with closure-proxy injection instead. Introduction diff --git a/components/filesystem/lock_handler.rst b/components/filesystem/lock_handler.rst index 1b963136b0b..28eaf3a6ba8 100644 --- a/components/filesystem/lock_handler.rst +++ b/components/filesystem/lock_handler.rst @@ -3,7 +3,7 @@ LockHandler .. deprecated:: 3.4 - The ``LockHandler`` class was deprecated in Symfony 3.4 and it will be + The ``LockHandler`` class was deprecated in Symfony 3.4 and will be removed in Symfony 4.0. Use :ref:`SemaphoreStore ` or :ref:`FlockStore ` from the Lock component instead. diff --git a/components/http_foundation/session_php_bridge.rst b/components/http_foundation/session_php_bridge.rst index 295c0976854..00f57e59e4f 100644 --- a/components/http_foundation/session_php_bridge.rst +++ b/components/http_foundation/session_php_bridge.rst @@ -12,7 +12,7 @@ As stated elsewhere, Symfony Sessions are designed to replace the use of PHP's native ``session_*()`` functions and use of the ``$_SESSION`` superglobal. Additionally, it is mandatory for Symfony to start the session. -However when there really are circumstances where this is not possible, you +However, when there really are circumstances where this is not possible, you can use a special storage bridge :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage` which is designed to allow Symfony to work with a session started outside of @@ -46,4 +46,3 @@ of your application to Symfony sessions. cannot access arbitrary keys in ``$_SESSION`` that may be set by the legacy application, although all the ``$_SESSION`` contents will be saved when the session is saved. - diff --git a/components/serializer.rst b/components/serializer.rst index 8a1b5b18bcc..e070f217350 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -630,7 +630,7 @@ There are several types of normalizers available: :class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeNormalizer` This normalizer converts :phpclass:`DateTimeInterface` objects (e.g. :phpclass:`DateTime` and :phpclass:`DateTimeImmutable`) into strings. - By default it uses the RFC3339_ format. + By default, it uses the RFC3339_ format. .. versionadded:: 3.2 @@ -643,7 +643,7 @@ There are several types of normalizers available: :class:`Symfony\\Component\\Serializer\\Normalizer\\DateIntervalNormalizer` This normalizer converts :phpclass:`DateInterval` objects into strings. - By default it uses the ``P%yY%mM%dDT%hH%iM%sS`` format. + By default, it uses the ``P%yY%mM%dDT%hH%iM%sS`` format. .. versionadded:: 3.4 diff --git a/components/translation/usage.rst b/components/translation/usage.rst index b0374cbffd7..09c943b8ec7 100644 --- a/components/translation/usage.rst +++ b/components/translation/usage.rst @@ -104,7 +104,7 @@ for the individual translation, and can be the message in the main locale (e.g. *"Symfony is great"*) of your application or a unique identifier (e.g. ``symfony.great`` - see the sidebar below). -Translation files can be created in several different formats, XLIFF being the +Translation files can be created in several formats, XLIFF being the recommended format. These files are parsed by one of the loader classes. .. configuration-block:: @@ -351,7 +351,7 @@ effect after removing the explicit rules: '{0} There are no apples|[20,Inf[ There are many apples|There is one apple|a_few: There are %count% apples' For example, for ``1`` apple, the standard rule ``There is one apple`` will -be used. For ``2-19`` apples, the second standard rule +be used. For ``2-19`` apples, the second standard rule ``There are %count% apples`` will be selected. An :class:`Symfony\\Component\\Translation\\Interval` can represent a finite set diff --git a/components/var_dumper/advanced.rst b/components/var_dumper/advanced.rst index 871f4d5c600..51c4c6cebfa 100644 --- a/components/var_dumper/advanced.rst +++ b/components/var_dumper/advanced.rst @@ -278,8 +278,8 @@ similar to PHP's short array notation:: // 0 => "test" // ] -If you would like to use both options, then you can just combine them by -using a the logical OR operator ``|``:: +If you would like to use both options, then you can just combine them by +using the logical OR operator ``|``:: use Symfony\Component\VarDumper\Dumper\AbstractDumper; use Symfony\Component\VarDumper\Dumper\CliDumper; diff --git a/components/yaml.rst b/components/yaml.rst index 2820eaa8d8c..67054e8d88c 100644 --- a/components/yaml.rst +++ b/components/yaml.rst @@ -192,7 +192,7 @@ representation to the inline one:: Indentation ........... -By default the YAML component will use 4 spaces for indentation. This can be +By default, the YAML component will use 4 spaces for indentation. This can be changed using the third argument as follows:: // uses 8 spaces for indentation @@ -290,7 +290,7 @@ representation of the object as a map. Handling Invalid Types ~~~~~~~~~~~~~~~~~~~~~~ -By default the parser will encode invalid types as ``null``. You can make the +By default, the parser will encode invalid types as ``null``. You can make the parser throw exceptions by using the ``PARSE_EXCEPTION_ON_INVALID_TYPE`` flag:: @@ -307,7 +307,7 @@ Similarly you can use ``DUMP_EXCEPTION_ON_INVALID_TYPE`` when dumping:: Date Handling ~~~~~~~~~~~~~ -By default the YAML parser will convert unquoted strings which look like a +By default, the YAML parser will convert unquoted strings which look like a date or a date-time into a Unix timestamp; for example ``2016-05-27`` or ``2016-05-27T02:59:43.1Z`` (ISO-8601_):: @@ -322,7 +322,7 @@ flag:: Dumping Multi-line Literal Blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In YAML multiple lines can be represented as literal blocks, by default the +In YAML, multiple lines can be represented as literal blocks. By default, the dumper will encode multiple lines as an inline string:: $string = ["string" => "Multiple\nLine\nString"]; diff --git a/configuration/external_parameters.rst b/configuration/external_parameters.rst index 57d8e93022d..5d65fb00a44 100644 --- a/configuration/external_parameters.rst +++ b/configuration/external_parameters.rst @@ -125,7 +125,7 @@ of the following: .. deprecated:: 3.3 The support of the special ``SYMFONY__`` environment variables was - deprecated in Symfony 3.3 and it will be removed in 4.0. Instead of + deprecated in Symfony 3.3 and will be removed in 4.0. Instead of using those variables, define regular environment variables and get their values using the ``%env(...)%`` syntax in your config files. diff --git a/configuration/using_parameters_in_dic.rst b/configuration/using_parameters_in_dic.rst index 3bdbcebf34e..13a179d1133 100644 --- a/configuration/using_parameters_in_dic.rst +++ b/configuration/using_parameters_in_dic.rst @@ -144,7 +144,7 @@ And set it in the constructor of ``Configuration`` via the ``Extension`` class:: .. sidebar:: Setting the Default in the Extension There are some instances of ``%kernel.debug%`` usage within a ``Configurator`` - class in TwigBundle and AsseticBundle. However this is because the default + class in TwigBundle and AsseticBundle. However, this is because the default parameter value is set by the Extension class. For example in AsseticBundle, you can find:: diff --git a/console/commands_as_services.rst b/console/commands_as_services.rst index 03eef9ac0c9..f5ccc02d00b 100644 --- a/console/commands_as_services.rst +++ b/console/commands_as_services.rst @@ -10,7 +10,7 @@ recommended setup. Symfony also looks in the ``Command/`` directory of each bundle for commands non registered as a service and automatically registers those classes as -commands. However this auto-registration was deprecated in Symfony 3.4. In +commands. However, this auto-registration was deprecated in Symfony 3.4. In Symfony 4.0, commands won't be auto-registered anymore. .. note:: diff --git a/contributing/code/pull_requests.rst b/contributing/code/pull_requests.rst index 52342af3230..bf1d07a4cc9 100644 --- a/contributing/code/pull_requests.rst +++ b/contributing/code/pull_requests.rst @@ -361,7 +361,7 @@ As long as you have items in the todo-list, please prefix the pull request title with "[WIP]". If you do not yet want to trigger the automated tests, you can also set the PR to `draft status`_. -In the pull request description, give as much details as possible about your +In the pull request description, give as much detail as possible about your changes (don't hesitate to give code examples to illustrate your points). If your pull request is about adding a new feature or modifying an existing one, explain the rationale for the changes. The pull request description helps the diff --git a/contributing/code/reproducer.rst b/contributing/code/reproducer.rst index 36a743b785e..f92cf460ea6 100644 --- a/contributing/code/reproducer.rst +++ b/contributing/code/reproducer.rst @@ -37,7 +37,7 @@ a PHP script, it's better to reproduce the bug by forking the Symfony Standard edition. To do so: #. Go to https://github.com/symfony/symfony-standard and click on the **Fork** - button to make a fork of that repository or go to your already forked copy. + button to make a fork of that repository or go to your already-forked copy. #. Clone the forked repository into your computer: ``git clone git://github.com/YOUR-GITHUB-USERNAME/symfony-standard.git`` #. Browse the project and create a new branch (e.g. ``issue_23567``, diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 7845e49ed89..e81d195ab71 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -209,7 +209,7 @@ Naming Conventions * Prefix all abstract classes with ``Abstract`` except PHPUnit ``*TestCase``. Please note some early Symfony classes do not follow this convention and - have not been renamed for backward compatibility reasons. However all new + have not been renamed for backward compatibility reasons. However, all new abstract classes must follow this naming convention; * Suffix interfaces with ``Interface``; diff --git a/contributing/code_of_conduct/reporting_guidelines.rst b/contributing/code_of_conduct/reporting_guidelines.rst index 1766d025e4d..63c4e820ce6 100644 --- a/contributing/code_of_conduct/reporting_guidelines.rst +++ b/contributing/code_of_conduct/reporting_guidelines.rst @@ -69,7 +69,7 @@ let them know what action (if any) we'll be taking. We'll take into account feed from the reporter on the appropriateness of our response, but our response will be determined by what will be best for community safety. -The CARE team keeps a private record of all incidents. By default all reports +The CARE team keeps a private record of all incidents. By default, all reports are shared with the entire CARE team unless the reporter specifically asks to exclude specific CARE team members, in which case these CARE team members will not be included in any communication on the incidents as well as records diff --git a/contributing/documentation/standards.rst b/contributing/documentation/standards.rst index b859b208741..49ebb3ef08b 100644 --- a/contributing/documentation/standards.rst +++ b/contributing/documentation/standards.rst @@ -137,7 +137,7 @@ Files and Directories * When referencing file extensions explicitly, you should include a leading dot for every extension (e.g. "XML files use the ``.xml`` extension"). * When you list a Symfony file/directory hierarchy, use ``your-project/`` as the - top level directory. E.g. + top-level directory. E.g. .. code-block:: text diff --git a/create_framework/front_controller.rst b/create_framework/front_controller.rst index 07948406d77..39286ba8c16 100644 --- a/create_framework/front_controller.rst +++ b/create_framework/front_controller.rst @@ -220,7 +220,7 @@ We have the first version of our framework:: $response->send(); -Adding a new page is a two step process: add an entry in the map and create a +Adding a new page is a two-step process: add an entry in the map and create a PHP template in ``src/pages/``. From a template, get the Request data via the ``$request`` variable and tweak the Response headers via the ``$response`` variable. diff --git a/create_framework/http_kernel_controller_resolver.rst b/create_framework/http_kernel_controller_resolver.rst index 90d9efa582a..e81dbbc9413 100644 --- a/create_framework/http_kernel_controller_resolver.rst +++ b/create_framework/http_kernel_controller_resolver.rst @@ -28,7 +28,7 @@ Update the route definition accordingly:: ])); The move is pretty straightforward and makes a lot of sense as soon as you -create more pages but you might have noticed a non-desirable side-effect... +create more pages but you might have noticed a non-desirable side effect... The ``LeapYearController`` class is *always* instantiated, even if the requested URL does not match the ``leap_year`` route. This is bad for one main reason: performance wise, all controllers for all routes must now be diff --git a/create_framework/separation_of_concerns.rst b/create_framework/separation_of_concerns.rst index 7444137ed71..3af0e98dd46 100644 --- a/create_framework/separation_of_concerns.rst +++ b/create_framework/separation_of_concerns.rst @@ -163,7 +163,7 @@ To sum up, here is the new file layout: └── front.php That's it! Our application has now four different layers and each of them has -a well defined goal: +a well-defined goal: * ``web/front.php``: The front controller; the only exposed PHP code that makes the interface with the client (it gets the Request and sends the diff --git a/deployment/azure-website.rst b/deployment/azure-website.rst index 1655c0ecedc..c758c239d1e 100644 --- a/deployment/azure-website.rst +++ b/deployment/azure-website.rst @@ -156,7 +156,7 @@ Enabling the PHP intl Extension no longer necessary.** You can check if the ``intl`` extension is enabled in the :phpfunction:`phpinfo` page. -However if the ``intl`` extension is not enabled you can follow these steps. +However, if the ``intl`` extension is not enabled you can follow these steps. This is the tricky part of the guide! To enable the ``intl`` extension, there is no need to upload any DLL files as the ``php_intl.dll`` file already exists on diff --git a/event_dispatcher.rst b/event_dispatcher.rst index 5504b08994e..1152da89856 100644 --- a/event_dispatcher.rst +++ b/event_dispatcher.rst @@ -110,7 +110,7 @@ using a special "tag": .. note:: There is an optional tag attribute called ``method`` which defines which method - to execute when the event is triggered. By default the name of the method is + to execute when the event is triggered. By default, the name of the method is ``on`` + "camel-cased event name". If the event is ``kernel.exception`` the method executed by default is ``onKernelException()``. diff --git a/form/create_custom_field_type.rst b/form/create_custom_field_type.rst index e0683d8e9c9..dde77eae638 100644 --- a/form/create_custom_field_type.rst +++ b/form/create_custom_field_type.rst @@ -5,7 +5,7 @@ How to Create a Custom Form Field Type ====================================== Symfony comes with a bunch of core field types available for building forms. -However there are situations where you may want to create a custom form field +However, there are situations where you may want to create a custom form field type for a specific purpose. This article assumes you need a field definition that holds a shipping option, based on the existing choice field. This section explains how the field is defined and how you can customize its layout. @@ -151,7 +151,7 @@ link for details), create a ``shipping_widget`` block to handle this: .. tip:: - You can further customize the template used to render each children of the + You can further customize the template used to render each child of the choice type. The block to override in that case is named "block name" + ``_entry_`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to customize the labels of the children of the Shipping widget you'd need to diff --git a/form/data_transformers.rst b/form/data_transformers.rst index cd70f049ccf..5beffdd2282 100644 --- a/form/data_transformers.rst +++ b/form/data_transformers.rst @@ -308,7 +308,7 @@ Now, you can use your ``TaskType``:: // ... Cool, you're done! Your user will be able to enter an issue number into the -text field and it will be transformed back into an Issue object. This means +text field, which will be transformed back into an Issue object. This means that, after a successful submission, the Form component will pass a real ``Issue`` object to ``Task::setIssue()`` instead of the issue number. diff --git a/form/dynamic_form_modification.rst b/form/dynamic_form_modification.rst index 1c0fbc55eda..aca0309198c 100644 --- a/form/dynamic_form_modification.rst +++ b/form/dynamic_form_modification.rst @@ -365,7 +365,7 @@ Dynamic Generation for Submitted Forms Another case that can appear is that you want to customize the form specific to the data that was submitted by the user. For example, imagine you have a registration form for sports gatherings. Some events will allow you to specify your preferred -position on the field. This would be a ``choice`` field for example. However the +position on the field. This would be a ``choice`` field for example. However, the possible choices will depend on each sport. Football will have attack, defense, goalkeeper etc... Baseball will have a pitcher but will not have a goalkeeper. You will need the correct options in order for validation to pass. diff --git a/form/embedded.rst b/form/embedded.rst index a86f5c0270b..dd843bfee50 100644 --- a/form/embedded.rst +++ b/form/embedded.rst @@ -60,7 +60,7 @@ Next, add a new ``category`` property to the ``Task`` class:: .. tip:: The ``Valid`` Constraint has been added to the property ``category``. This - cascades the validation to the corresponding entity. If you omit this constraint + cascades the validation to the corresponding entity. If you omit this constraint, the child entity would not be validated. Now that your application has been updated to reflect the new requirements, diff --git a/form/form_customization.rst b/form/form_customization.rst index 0be0be98b69..ba18cfa403f 100644 --- a/form/form_customization.rst +++ b/form/form_customization.rst @@ -55,7 +55,7 @@ just one line: {{ form(form) }} The remainder of this recipe will explain how every part of the form's markup -can be modified at several different levels. For more information about form +can be modified at several levels. For more information about form rendering in general, see :doc:`/form/rendering`. .. _form-customization-form-themes: @@ -613,7 +613,7 @@ Part of the Form Block Name Other common Customizations --------------------------- -So far, this recipe has shown you several different ways to customize a single +So far, this recipe has shown you several ways to customize a single piece of how a form is rendered. The key is to customize a specific fragment that corresponds to the portion of the form you want to control (see :ref:`naming form blocks `). @@ -632,8 +632,8 @@ Customizing Error Output are determined by the validation constraints you apply to your objects. For more information, see the article on :doc:`validation `. -There are many different ways to customize how errors are rendered when a -form is submitted with errors. The error messages for a field are rendered +There are many ways to customize how errors are rendered when a form is +submitted with errors. The error messages for a field are rendered when you use the ``form_errors()`` helper: .. code-block:: twig diff --git a/form/form_themes.rst b/form/form_themes.rst index 729cd0d1c11..bc0b1140e8a 100644 --- a/form/form_themes.rst +++ b/form/form_themes.rst @@ -62,7 +62,7 @@ Your custom theme does not have to override all the blocks. When rendering a blo which is not overridden in your custom theme, the theming engine will fall back to the global theme (defined at the bundle level). -If several custom themes are provided they will be searched in the listed order +If several custom themes are provided, they will be searched in the listed order before falling back to the global theme. To customize any portion of a form, you just need to override the appropriate @@ -88,7 +88,7 @@ In Twig, every block needed is defined in a single template file (e.g. file, you can see every block needed to render a form and every default field type. -In PHP, the fragments are individual template files. By default they are located in +In PHP, the fragments are individual template files. By default, they are located in the ``Resources/views/Form`` directory of the FrameworkBundle (`view on GitHub`_). Each fragment name follows the same basic pattern and is broken up into two pieces, diff --git a/frontend/assetic/uglifyjs.rst b/frontend/assetic/uglifyjs.rst index 8c9a2d56ab2..af46db3e775 100644 --- a/frontend/assetic/uglifyjs.rst +++ b/frontend/assetic/uglifyjs.rst @@ -203,7 +203,7 @@ asset tags of your templates to tell Assetic to use the ``uglifyjs2`` filter: The above example assumes that you have a bundle called AppBundle and your JavaScript files are in the ``Resources/public/js`` directory under your - bundle. However you can include your JavaScript files no matter where they are. + bundle. However, you can include your JavaScript files no matter where they are. With the addition of the ``uglifyjs2`` filter to the asset tags above, you should now see minified JavaScripts coming over the wire much faster. diff --git a/frontend/encore/installation.rst b/frontend/encore/installation.rst index 2b94bebabca..56e4acdce08 100644 --- a/frontend/encore/installation.rst +++ b/frontend/encore/installation.rst @@ -71,7 +71,7 @@ is the main config file for both Webpack and Webpack Encore: * (including one that's included on every page - e.g. "app") * * Each entry will result in one JavaScript file (e.g. app.js) - * and one CSS file (e.g. app.css) if you JavaScript imports CSS. + * and one CSS file (e.g. app.css) if your JavaScript imports CSS. */ .addEntry('app', './assets/js/app.js') //.addEntry('page1', './assets/js/page1.js') diff --git a/http_cache.rst b/http_cache.rst index 5bf9ea49598..59db953ff06 100644 --- a/http_cache.rst +++ b/http_cache.rst @@ -291,7 +291,7 @@ two things: and mutating your application. * POST requests are generally considered uncacheable, but `they can be cached`_ - when they include explicit freshness information. However POST caching is not + when they include explicit freshness information. However, POST caching is not widely implemented, so you should avoid it if possible. * You should *never* change the state of your application (e.g. update a blog post) diff --git a/logging/channels_handlers.rst b/logging/channels_handlers.rst index f63a836c0c8..0d46fe6b39e 100644 --- a/logging/channels_handlers.rst +++ b/logging/channels_handlers.rst @@ -97,7 +97,7 @@ in all environments, or just ``config_prod.yml`` to happen only in ``prod``: .. caution:: - The ``channels`` configuration only works for top level handlers. Handlers + The ``channels`` configuration only works for top-level handlers. Handlers that are nested inside a group, buffer, filter, fingers crossed or other such handler will ignore this configuration and will process every message passed to them. diff --git a/profiler/storage.rst b/profiler/storage.rst index e0fb83bfec6..78bd45164f0 100644 --- a/profiler/storage.rst +++ b/profiler/storage.rst @@ -8,7 +8,7 @@ In Symfony versions prior to 3.0, profiles could be stored in files, databases, services like Redis and Memcache, etc. Starting from Symfony 3.0, the only storage mechanism with built-in support is the filesystem. -By default the profile stores the collected data in the ``%kernel.cache_dir%/profiler/`` +By default, the profile stores the collected data in the ``%kernel.cache_dir%/profiler/`` directory. If you want to use another location to store the profiles, define the ``dsn`` option of the ``framework.profiler``: diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index b648ea96183..775ab1dbce2 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -259,7 +259,7 @@ dir ... Path to the mapping or entity files (depending on the driver). If this path -is relative it is assumed to be relative to the bundle root. This only works +is relative, it is assumed to be relative to the bundle root. This only works if the name of your mapping is a bundle name. If you want to use this option to specify absolute paths you should prefix the path with the kernel parameters that exist in the DIC (for example ``%kernel.project_dir%``). diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index cbea9180d59..7aa44f1a924 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -845,7 +845,7 @@ name **type**: ``string`` **default**: ``null`` -This specifies the name of the session cookie. By default it will use the +This specifies the name of the session cookie. By default, it will use the cookie name which is defined in the ``php.ini`` with the ``session.name`` directive. @@ -864,7 +864,7 @@ cookie_path **type**: ``string`` **default**: ``/`` -This determines the path to set in the session cookie. By default it will +This determines the path to set in the session cookie. By default, it will use ``/``. cookie_domain @@ -872,7 +872,7 @@ cookie_domain **type**: ``string`` **default**: ``''`` -This determines the domain to set in the session cookie. By default it's +This determines the domain to set in the session cookie. By default, it's blank, meaning the host name of the server which generated the cookie according to the cookie specification. @@ -1028,7 +1028,7 @@ use_cookies **type**: ``boolean`` **default**: ``null`` This specifies if the session ID is stored on the client side using cookies or -not. By default it will use the value defined in the ``php.ini`` with the +not. By default, it will use the value defined in the ``php.ini`` with the ``session.use_cookies`` directive. assets diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index b17e1278f00..bb2983fdb41 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -552,7 +552,7 @@ For even more details, see :doc:`/security/ldap`. You can authenticate to an LDAP server using the LDAP variants of the ``form_login`` and ``http_basic`` authentication providers. Simply use ``form_login_ldap`` and ``http_basic_ldap``, which will attempt to -``bind`` against a LDAP server instead of using password comparison. +``bind`` against an LDAP server instead of using password comparison. Both authentication providers have the same arguments as their normal counterparts, with the addition of two configuration keys: @@ -588,7 +588,7 @@ statically using the ``dn_string`` config option. **User provider** Users will still be fetched from the configured user provider. If you -wish to fetch your users from a LDAP server, you will need to use the +wish to fetch your users from an LDAP server, you will need to use the ``ldap`` user provider, in addition to one of the two authentication providers (``form_login_ldap`` or ``http_basic_ldap``). @@ -616,7 +616,7 @@ HTTP-Digest Authentication .. deprecated:: 3.4 - HTTP-Digest Authentication was deprecated in Symfony 3.4 and it will be + HTTP-Digest Authentication was deprecated in Symfony 3.4 and will be removed in Symfony 4.0. To use HTTP-Digest authentication you need to provide a realm and a secret: @@ -752,11 +752,11 @@ providers --------- This options defines how the application users are loaded (from a database, -a LDAP server, a configuration file, etc.) Read the following articles to learn +an LDAP server, a configuration file, etc.) Read the following articles to learn more about each of those providers: * :doc:`Load users from a database ` -* :doc:`Load users from a LDAP server ` +* :doc:`Load users from an LDAP server ` * :ref:`Load users from a configuration file ` * :doc:`Create your own user provider ` diff --git a/reference/configuration/web_profiler.rst b/reference/configuration/web_profiler.rst index 83e58a190ba..f8c8cc951d5 100644 --- a/reference/configuration/web_profiler.rst +++ b/reference/configuration/web_profiler.rst @@ -52,7 +52,7 @@ position .. deprecated:: 3.4 - The ``position`` option was deprecated in Symfony 3.4 and it will be removed + The ``position`` option was deprecated in Symfony 3.4 and will be removed in Symfony 4.0, where the toolbar is always displayed in the ``bottom`` position. **type**: ``string`` **default**: ``bottom`` @@ -79,10 +79,10 @@ excluded_ajax_paths **type**: ``string`` **default**: ``'^/(app(_[\\w]+)?\\.php/)?_wdt'`` -When the toolbar logs Ajax requests, it matches their URLs against this regular +When the toolbar logs AJAX requests, it matches their URLs against this regular expression. If the URL matches, the request is not displayed in the toolbar. This -is useful when the application makes lots of Ajax requests or they are heavy and -you want to exclude some of them. +is useful when the application makes lots of AJAX requests, or if they are heavy +and you want to exclude some of them. verbose ~~~~~~~ diff --git a/reference/forms/twig_reference.rst b/reference/forms/twig_reference.rst index d2aee822cfd..311f2c850f3 100644 --- a/reference/forms/twig_reference.rst +++ b/reference/forms/twig_reference.rst @@ -22,7 +22,7 @@ Form Rendering Functions ------------------------ This reference manual covers all the possible Twig functions available for -rendering forms. There are several different functions available and +rendering forms. There are several functions available and each is responsible for rendering a different part of a form (e.g. labels, errors, widgets, etc). diff --git a/reference/forms/types/options/_error_bubbling_hint.rst.inc b/reference/forms/types/options/_error_bubbling_hint.rst.inc index 743da6f8d0e..78d5186b9c0 100644 --- a/reference/forms/types/options/_error_bubbling_hint.rst.inc +++ b/reference/forms/types/options/_error_bubbling_hint.rst.inc @@ -1,6 +1,6 @@ .. tip:: - By default the ``error_bubbling`` option is enabled for the + By default, the ``error_bubbling`` option is enabled for the :doc:`collection Field Type `, which passes the errors to the parent form. If you want to attach the errors to the locations where they actually occur you have to diff --git a/reference/forms/types/options/checkbox_compound.rst.inc b/reference/forms/types/options/checkbox_compound.rst.inc index bf328936647..e8e8a9c13ac 100644 --- a/reference/forms/types/options/checkbox_compound.rst.inc +++ b/reference/forms/types/options/checkbox_compound.rst.inc @@ -4,4 +4,4 @@ compound **type**: ``boolean`` **default**: ``false`` This option specifies if a form is compound. As it's not the case for checkbox, -by default the value is overridden with the ``false`` value. +by default, the value is overridden with the ``false`` value. diff --git a/reference/forms/types/options/required.rst.inc b/reference/forms/types/options/required.rst.inc index 6d9b09319b1..f7712114b08 100644 --- a/reference/forms/types/options/required.rst.inc +++ b/reference/forms/types/options/required.rst.inc @@ -6,7 +6,7 @@ required If true, an `HTML5 required attribute`_ will be rendered. The corresponding ``label`` will also render with a ``required`` class. -This is superficial and independent from validation. At best, if you let +This is superficial and independent of validation. At best, if you let Symfony guess your field type, then the value of this option will be guessed from your validation information. diff --git a/reference/forms/types/options/select_how_rendered.rst.inc b/reference/forms/types/options/select_how_rendered.rst.inc index b131971ffff..4206c1eb237 100644 --- a/reference/forms/types/options/select_how_rendered.rst.inc +++ b/reference/forms/types/options/select_how_rendered.rst.inc @@ -1,7 +1,7 @@ Select Tag, Checkboxes or Radio Buttons --------------------------------------- -This field may be rendered as one of several different HTML fields, depending +This field may be rendered as one of several HTML fields, depending on the ``expanded`` and ``multiple`` options: ======================================== ========= ========= diff --git a/reference/forms/types/tel.rst b/reference/forms/types/tel.rst index a409978b7ad..ea8255057af 100644 --- a/reference/forms/types/tel.rst +++ b/reference/forms/types/tel.rst @@ -9,7 +9,7 @@ The ``TelType`` field is a text field that is rendered using the HTML5 of this type is not validated in any way, because formats for telephone numbers vary too much depending on each country. -Nevertheless it may be useful to use this type in web applications because some +Nevertheless, it may be useful to use this type in web applications because some browsers (e.g. smartphone browsers) adapt the input keyboard to make it easier to input phone numbers. diff --git a/routing.rst b/routing.rst index 9c236ff8d7d..74597a3b6e3 100644 --- a/routing.rst +++ b/routing.rst @@ -143,7 +143,7 @@ match). .. caution:: - However the slash ``/`` is ignored by default in placeholder values because + However, the slash ``/`` is ignored by default in placeholder values because the router uses it as separator between different placeholders. To learn more about this, you can read :ref:`routing/slash_in_parameter`. diff --git a/routing/hostname_pattern.rst b/routing/hostname_pattern.rst index d176c6f4fc2..7656c011e52 100644 --- a/routing/hostname_pattern.rst +++ b/routing/hostname_pattern.rst @@ -79,8 +79,8 @@ You can also match any route with the HTTP *host* of the incoming request. return $routes; -Both routes match the same path ``/``, however the first one will match -only if the host is ``m.example.com``. +Both routes match the same path, ``/``. However, the first one will only +match if the host is ``m.example.com``. Using Placeholders ------------------ diff --git a/security/acl.rst b/security/acl.rst index f967f3e1801..f69d3cb3845 100644 --- a/security/acl.rst +++ b/security/acl.rst @@ -215,8 +215,8 @@ checks whether the user has any of them. .. note:: - You can define up to 32 base permissions (depending on your OS PHP might - vary between 30 to 32). In addition, you can also define cumulative + You can define up to 32 base permissions (depending on your OS, PHP might + vary between 30 and 32). In addition, you can also define cumulative permissions. Cumulative Permissions diff --git a/security/entity_provider.rst b/security/entity_provider.rst index cb9a135b34f..0e3573776e8 100644 --- a/security/entity_provider.rst +++ b/security/entity_provider.rst @@ -528,7 +528,7 @@ User object to make sure that they represent the same user. For example, if the ``username`` on the 2 User objects doesn't match for some reason, then the user will be logged out for security reasons. -Even though this all happens automatically, there are a few important side-effects. +Even though this all happens automatically, there are a few important side effects. First, the :phpclass:`Serializable` interface and its ``serialize()`` and ``unserialize()`` methods have been added to allow the ``User`` class to be serialized diff --git a/session/locale_sticky_session.rst b/session/locale_sticky_session.rst index a431cb9259b..1f3bbe74e81 100644 --- a/session/locale_sticky_session.rst +++ b/session/locale_sticky_session.rst @@ -63,7 +63,7 @@ you're done! Symfony will automatically know about the event subscriber and call the ``onKernelRequest`` method on each request. To see it working, either set the ``_locale`` key on the session manually (e.g. -via some "Change Locale" route & controller), or create a route with a the :ref:`_locale default `. +via some "Change Locale" route & controller), or create a route with the :ref:`_locale default `. .. sidebar:: Explicitly Configure the Subscriber diff --git a/templating.rst b/templating.rst index 6307321dd48..9339c2c9600 100644 --- a/templating.rst +++ b/templating.rst @@ -735,8 +735,8 @@ block of the base template. You can also include assets located in your bundles' ``Resources/public`` folder. You will need to run the ``php bin/console assets:install target [--symlink]`` -command, which copies (or symlinks) files into the correct location. (target -is by default the "web/" directory of your application). +command, which copies (or symlinks) files into the correct location. (By default, +the target is the ``web/`` directory of your application.) .. code-block:: html+twig diff --git a/testing.rst b/testing.rst index 216b0d40e7a..0c33be7e331 100644 --- a/testing.rst +++ b/testing.rst @@ -449,7 +449,7 @@ or perform more complex requests. Some useful examples:: ); Last but not least, you can force each request to be executed in its own PHP -process to avoid any side-effects when working with several clients in the same +process to avoid any side effects when working with several clients in the same script:: $client->insulate(); diff --git a/testing/insulating_clients.rst b/testing/insulating_clients.rst index f49906d9b09..ad7820688b5 100644 --- a/testing/insulating_clients.rst +++ b/testing/insulating_clients.rst @@ -39,7 +39,7 @@ can insulate your clients:: $this->assertRegExp('/Hello/', $sally->getResponse()->getContent()); Insulated clients transparently execute their requests in a dedicated and -clean PHP process, thus avoiding any side-effects. +clean PHP process, thus avoiding any side effects. .. tip:: diff --git a/translation/debug.rst b/translation/debug.rst index dbd9f006428..767f0ef96aa 100644 --- a/translation/debug.rst +++ b/translation/debug.rst @@ -178,7 +178,7 @@ You can see that the translations of the message are identical in the ``fr`` and ``en`` locales which means this message was probably copied from French to English and maybe you forgot to translate it. -By default all domains are inspected, but it is possible to specify a single +By default, all domains are inspected, but it is possible to specify a single domain: .. code-block:: terminal