diff --git a/cookbook/assetic/asset_management.rst b/cookbook/assetic/asset_management.rst index 6743796edba..8d8c608d2f1 100644 --- a/cookbook/assetic/asset_management.rst +++ b/cookbook/assetic/asset_management.rst @@ -91,7 +91,7 @@ To include JavaScript files, use the ``javascripts`` tag in any template: You can also include CSS Stylesheets: see :ref:`cookbook-assetic-including-css`. -In this example, all of the files in the ``Resources/public/js/`` directory +In this example, all the files in the ``Resources/public/js/`` directory of the ``AcmeFooBundle`` will be loaded and served from a different location. The actual rendered tag might simply look like: @@ -351,7 +351,7 @@ Filters Once they're managed by Assetic, you can apply filters to your assets before they are served. This includes filters that compress the output of your assets for smaller file sizes (and better front-end optimization). Other filters -can compile JavaScript file from CoffeeScript files and process SASS into CSS. +can compile CoffeeScript files to JavaScript and process SASS into CSS. In fact, Assetic has a long list of available filters. Many of the filters do not do the work directly, but use existing third-party diff --git a/cookbook/assetic/jpeg_optimize.rst b/cookbook/assetic/jpeg_optimize.rst index 01f67f6ebcb..35fd962f0cc 100644 --- a/cookbook/assetic/jpeg_optimize.rst +++ b/cookbook/assetic/jpeg_optimize.rst @@ -4,7 +4,7 @@ How to Use Assetic for Image Optimization with Twig Functions ============================================================= -Amongst its many filters, Assetic has four filters which can be used for on-the-fly +Among its many filters, Assetic has four filters which can be used for on-the-fly image optimization. This allows you to get the benefits of smaller file sizes without having to use an image editor to process each image. The results are cached and can be dumped for production so there is no performance hit @@ -74,7 +74,7 @@ It can now be used from a template: Removing all EXIF Data ~~~~~~~~~~~~~~~~~~~~~~ -By default, running this filter only removes some of the meta information +By default, running this filter only removes some meta information stored in the file. Any EXIF data and comments are not removed, but you can remove these by using the ``strip_all`` option: diff --git a/cookbook/assetic/yuicompressor.rst b/cookbook/assetic/yuicompressor.rst index fedd4dab1da..8cf9d550741 100644 --- a/cookbook/assetic/yuicompressor.rst +++ b/cookbook/assetic/yuicompressor.rst @@ -22,7 +22,7 @@ Download the YUI Compressor JAR ------------------------------- The YUI Compressor is written in Java and distributed as a JAR. `Download the JAR`_ -from the Yahoo! site and save it to ``app/Resources/java/yuicompressor.jar``. +from the Yahoo! website and save it to ``app/Resources/java/yuicompressor.jar``. Configure the YUI Filters ------------------------- diff --git a/cookbook/bundles/configuration.rst b/cookbook/bundles/configuration.rst index 445521f9c58..4ee832b1cea 100644 --- a/cookbook/bundles/configuration.rst +++ b/cookbook/bundles/configuration.rst @@ -210,7 +210,7 @@ The ``Configuration`` class to handle the sample configuration looks like:: supporting "prototype" nodes, advanced validation, XML-specific normalization and advanced merging. You can read more about this in :doc:`the Config component documentation `. You - can also see it in action by checking out some of the core Configuration + can also see it in action by checking out some core Configuration classes, such as the one from the `FrameworkBundle Configuration`_ or the `TwigBundle Configuration`_. @@ -227,7 +227,7 @@ thrown):: } The ``processConfiguration()`` method uses the configuration tree you've defined -in the ``Configuration`` class to validate, normalize and merge all of the +in the ``Configuration`` class to validate, normalize and merge all the configuration arrays together. .. tip:: @@ -253,7 +253,7 @@ configuration arrays together. } This class uses the ``getConfiguration()`` method to get the Configuration - instance, you should override it if your Configuration class is not called + instance. You should override it if your Configuration class is not called ``Configuration`` or if it is not placed in the same namespace as the extension. diff --git a/cookbook/bundles/override.rst b/cookbook/bundles/override.rst index 736c72ffa64..85c1eeb5c3c 100644 --- a/cookbook/bundles/override.rst +++ b/cookbook/bundles/override.rst @@ -90,8 +90,8 @@ In this example you fetch the service definition of the original service, and se its class name to your own class. See :doc:`/cookbook/service_container/compiler_passes` for information on how to use -compiler passes. If you want to do something beyond just overriding the class - -like adding a method call - you can only use the compiler pass method. +compiler passes. If you want to do something beyond just overriding the class, +like adding a method call, you can only use the compiler pass method. Entities & Entity Mapping ------------------------- diff --git a/cookbook/bundles/prepend_extension.rst b/cookbook/bundles/prepend_extension.rst index 4c5cb7364fc..32ce5e692a7 100644 --- a/cookbook/bundles/prepend_extension.rst +++ b/cookbook/bundles/prepend_extension.rst @@ -15,7 +15,7 @@ often need to be repeated for various bundles. Using the below approach, it is possible to remove the disadvantage of the multiple bundle approach by enabling a single Extension to prepend the settings for any bundle. It can use the settings defined in the ``app/config/config.yml`` -to prepend settings just as if they would have been written explicitly by +to prepend settings just as if they had been written explicitly by the user in the application configuration. For example, this could be used to configure the entity manager name to use in diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index 407ee421aa4..687f4153539 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -56,7 +56,7 @@ Remove the ``_acme_demo`` entry at the bottom of this file. Some bundles contain configuration in one of the ``app/config/config*.yml`` files. Be sure to remove the related configuration from these files. You can -quickly spot bundle configuration by looking for a ``acme_demo`` (or whatever +quickly spot bundle configuration by looking for an ``acme_demo`` (or whatever the name of the bundle is, e.g. ``fos_user`` for the FOSUserBundle) string in the configuration files. diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 6c53138fdd9..5773dddca59 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -25,14 +25,14 @@ Routing and X-FORWARDED Headers ------------------------------- To ensure that the Symfony Router generates URLs correctly with Varnish, -a ``X-Forwarded-Port`` header must be present for Symfony to use the +an ``X-Forwarded-Port`` header must be present for Symfony to use the correct port number. -This port depends on your setup. Lets say that external connections come in +This port depends on your setup. Let's say that external connections come in on the default HTTP port 80. For HTTPS connections, there is another proxy (as Varnish does not do HTTPS itself) on the default HTTPS port 443 that handles the SSL termination and forwards the requests as HTTP requests to -Varnish with a ``X-Forwarded-Proto`` header. In this case, you need to add +Varnish with an ``X-Forwarded-Proto`` header. In this case, you need to add the following configuration snippet: .. code-block:: varnish4 @@ -143,7 +143,7 @@ Symfony adds automatically: .. tip:: If you followed the advice about ensuring a consistent caching - behaviour, those vcl functions already exist. Just append the code + behaviour, those VCL functions already exist. Just append the code to the end of the function, they won't interfere with each other. .. index:: diff --git a/cookbook/configuration/apache_router.rst b/cookbook/configuration/apache_router.rst index 90f652992f4..dadd77c9e31 100644 --- a/cookbook/configuration/apache_router.rst +++ b/cookbook/configuration/apache_router.rst @@ -4,8 +4,10 @@ How to Use the Apache Router ============================ -Symfony, while fast out of the box, also provides various ways to increase that speed with a little bit of tweaking. -One of these ways is by letting Apache handle routes directly, rather than using Symfony for this task. +Symfony, while fast out of the box, also provides various ways to +increase that speed with a bit of tweaking. +One of these ways is by letting Apache handle routes directly, rather +than using Symfony for this task. Change Router Configuration Parameters -------------------------------------- @@ -122,7 +124,7 @@ You're now all set to use Apache routes. Additional Tweaks ----------------- -To save a little bit of processing time, change occurrences of ``Request`` +To save some processing time, change occurrences of ``Request`` to ``ApacheRequest`` in ``web/app.php``:: // web/app.php diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index b658b16f360..ea9e35c14c1 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -6,7 +6,7 @@ How to Master and Create new Environments Every application is the combination of code and a set of configuration that dictates how that code should function. The configuration may define the -database being used, whether or not something should be cached, or how verbose +database being used, if something should be cached or how verbose logging should be. In Symfony, the idea of "environments" is the idea that the same codebase can be run using multiple different configurations. For example, the ``dev`` environment should use configuration that makes development @@ -171,10 +171,10 @@ environment by using this code and changing the environment string. Important, but unrelated to the topic of *environments* is the ``false`` argument as the second argument to the ``AppKernel`` constructor. This - specifies whether or not the application should run in "debug mode". Regardless + specifies if the application should run in "debug mode". Regardless of the environment, a Symfony application can be run with debug mode set to ``true`` or ``false``. This affects many things in the application, - such as whether or not errors should be displayed or if cache files are + such as if errors should be displayed 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. @@ -323,7 +323,7 @@ The new environment is now accessible via:: .. note:: Some environments, like the ``dev`` environment, are never meant to be - accessed on any deployed server by the general public. This is because + accessed on any deployed server by the public. This is because certain environments, for debugging purposes, may give too much information about the application or underlying infrastructure. To be sure these environments aren't accessible, the front controller is usually protected from external diff --git a/cookbook/configuration/front_controllers_and_kernel.rst b/cookbook/configuration/front_controllers_and_kernel.rst index c916c1aa427..48fbce172d3 100644 --- a/cookbook/configuration/front_controllers_and_kernel.rst +++ b/cookbook/configuration/front_controllers_and_kernel.rst @@ -39,7 +39,7 @@ The main purpose of the front controller is to create an instance of the and return the resulting response to the browser. Because every request is routed through it, the front controller can be -used to perform global initializations prior to setting up the kernel or +used to perform global initialization prior to setting up the kernel or to `decorate`_ the kernel with additional features. Examples include: * Configuring the autoloader or adding additional autoloading mechanisms; diff --git a/cookbook/configuration/pdo_session_storage.rst b/cookbook/configuration/pdo_session_storage.rst index 7955873d878..f3da4a40b59 100644 --- a/cookbook/configuration/pdo_session_storage.rst +++ b/cookbook/configuration/pdo_session_storage.rst @@ -7,7 +7,7 @@ How to Use PdoSessionHandler to Store Sessions in the Database The default Symfony session storage writes the session information to file(s). Most medium to large websites use a database to store the session values instead of files, because databases are easier to use and scale in a -multi-webserver environment. +multi webserver environment. Symfony has a built-in solution for database session storage called :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler`. @@ -17,7 +17,7 @@ configuration format of your choice): .. versionadded:: 2.1 In Symfony 2.1 the class and namespace are slightly modified. You can now find the session storage classes in the ``Session\Storage`` namespace: - ``Symfony\Component\HttpFoundation\Session\Storage``. Also + ``Symfony\Component\HttpFoundation\Session\Storage``. Also, note that in Symfony 2.1 you should configure ``handler_id`` not ``storage_id`` like in Symfony 2.0. Below, you'll notice that ``%session.storage.options%`` is not used anymore. diff --git a/cookbook/configuration/using_parameters_in_dic.rst b/cookbook/configuration/using_parameters_in_dic.rst index 0d224ec5593..ddff0440056 100644 --- a/cookbook/configuration/using_parameters_in_dic.rst +++ b/cookbook/configuration/using_parameters_in_dic.rst @@ -9,7 +9,7 @@ You have seen how to use configuration parameters within There are special cases such as when you want, for instance, to use the ``%kernel.debug%`` parameter to make the services in your bundle enter debug mode. For this case there is more work to do in order -to make the system understand the parameter value. By default +to make the system understand the parameter value. By default, your parameter ``%kernel.debug%`` will be treated as a simple string. Consider this example with the AcmeDemoBundle::