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:: diff --git a/cookbook/console/console_command.rst b/cookbook/console/console_command.rst index 4a2ea5cafb2..7daa552c1b5 100644 --- a/cookbook/console/console_command.rst +++ b/cookbook/console/console_command.rst @@ -134,7 +134,7 @@ before translating contents:: } } -However for other services the solution might be more complex. For more details, +However, for other services the solution might be more complex. For more details, see :doc:`/cookbook/service_container/scopes`. Testing Commands diff --git a/cookbook/console/usage.rst b/cookbook/console/usage.rst index 9fa569f9d7f..276c8329d15 100644 --- a/cookbook/console/usage.rst +++ b/cookbook/console/usage.rst @@ -56,7 +56,7 @@ When using the shell you can choose to run each command in a separate process: $ php app/console -s --process-isolation When you do this, the output will not be colorized and interactivity is not -supported so you will need to pass all command params explicitly. +supported so you will need to pass all command parameters explicitly. .. note:: diff --git a/cookbook/controller/service.rst b/cookbook/controller/service.rst index bf2cadb2887..57343eae1e2 100644 --- a/cookbook/controller/service.rst +++ b/cookbook/controller/service.rst @@ -11,11 +11,11 @@ this works fine, controllers can also be specified as services. .. note:: - Specifying a controller as a service takes a little bit more work. The + Specifying a controller as a service takes a bit more work. The primary advantage is that the entire controller or any services passed to the controller can be modified via the service container configuration. This is especially useful when developing an open-source bundle or any - bundle that will be used in many different projects. + bundle that will be used in different projects. A second advantage is that your controllers are more "sandboxed". By looking at the constructor arguments, it's easy to see what types of things diff --git a/cookbook/deployment/azure-website.rst b/cookbook/deployment/azure-website.rst index efee282260e..c351fb8f390 100644 --- a/cookbook/deployment/azure-website.rst +++ b/cookbook/deployment/azure-website.rst @@ -6,14 +6,14 @@ Deploying to Microsoft Azure Website Cloud This step by step cookbook describes how to deploy a small Symfony web application to the Microsoft Azure Website cloud platform. It will explain how -to setup a new Azure website including configuring the right PHP version and +to set up a new Azure website including configuring the right PHP version and global environment variables. The document also shows how to you can leverage Git and Composer to deploy your Symfony application to the cloud. Setting up the Azure Website ---------------------------- -To setup a new Microsoft Azure Website, first `signup with Azure`_ or sign in +To set up a new Microsoft Azure Website, first `sign up with Azure`_ or sign in with your credentials. Once you're connected to your `Azure Portal`_ interface, scroll down to the bottom and select the **New** panel. On this panel, click **Web Site** and choose **Custom Create**: @@ -41,7 +41,7 @@ next step. Step 2: New MySQL Database ~~~~~~~~~~~~~~~~~~~~~~~~~~ -On this step, you will be prompted to setup your MySQL database storage with a +On this step, you will be prompted to set up your MySQL database storage with a database name and a region. The MySQL database storage is provided by Microsoft in partnership with ClearDB. Choose the same region you selected for the hosting plan configuration in the previous step. @@ -114,7 +114,7 @@ the web server. Choosing a more recent PHP version can greatly improve runtime performance. PHP 5.5 ships with a new built-in PHP accelerator called OPCache that replaces APC. On an Azure Website, OPCache is already enabled and there - is no need to install and setup APC. + is no need to install and set up APC. The following screenshot shows the output of a :phpfunction:`phpinfo` script run from an Azure Website to verify that PHP 5.5 is running with @@ -171,7 +171,7 @@ this file just needs to be moved into the custom website extension directory. longer be necessary. To get the ``php_intl.dll`` file under your ``site/wwwroot`` directory, simply -access the online **Kudu** tool by browsing to the following url: +access the online **Kudu** tool by browsing to the following URL: .. code-block:: text @@ -342,7 +342,7 @@ credentials, CSRF token protection, etc. These parameters come from the .. image:: /images/cookbook/deployment/azure-website/step-16.png :alt: Configuring Symfony global parameters -The most important thing in this cookbook is to correctly setup your database +The most important thing in this cookbook is to correctly set up your database settings. You can get your MySQL database settings on the right sidebar of the **Azure Website Dashboard** panel. Simply click on the **View Connection Strings** link to make them appear in a pop-in. @@ -395,7 +395,7 @@ Symfony application is more complex than a basic Symfony Standard Edition, you may have additional commands to execute for setup (see :doc:`/cookbook/deployment/tools`). Make sure that your application is running by browsing the ``app.php`` front -controller with your web browser and the following url: +controller with your web browser and the following URL: .. code-block:: bash @@ -408,7 +408,7 @@ Configure the Web Server ~~~~~~~~~~~~~~~~~~~~~~~~ At this point, the Symfony application has been deployed and works perfectly on -the Azure Website. However, the ``web`` folder is still part of the url, which +the Azure Website. However, the ``web`` folder is still part of the URL, which you definitely don't want. But don't worry! You can easily configure the web server to point to the ``web`` folder and remove the ``web`` in the URL (and guarantee that nobody can access files outside of the ``web`` directory.) @@ -453,9 +453,9 @@ application, configure it with the following content: As you can see, the latest rule ``RewriteRequestsToPublic`` is responsible for -rewriting any urls to the ``web/app.php`` front controller which allows you to +rewriting any URLs to the ``web/app.php`` front controller which allows you to skip the ``web/`` folder in the URL. The first rule called ``BlockAccessToPublic`` -matches all url patterns that contain the ``web/`` folder and serves a +matches all URL patterns that contain the ``web/`` folder and serves a ``403 Forbidden`` HTTP response instead. This example is based on Benjamin Eberlei's sample you can find on GitHub in the `SymfonyAzureEdition`_ bundle. @@ -471,7 +471,7 @@ and executed on a Microsoft IIS web server. The process is simple and easy to implement. And as a bonus, Microsoft is continuing to reduce the number of steps needed so that deployment becomes even easier. -.. _`signup with Azure`: https://signup.live.com/signup.aspx +.. _`sign up with Azure`: https://signup.live.com/signup.aspx .. _`Azure Portal`: https://manage.windowsazure.com .. _`PHP MSDN documentation`: http://blogs.msdn.com/b/silverlining/archive/2012/07/10/configuring-php-in-windows-azure-websites-with-user-ini-files.aspx .. _`git-scm.com`: http://git-scm.com/download diff --git a/cookbook/deployment/heroku.rst b/cookbook/deployment/heroku.rst index 44f33b46362..a771fdb335e 100644 --- a/cookbook/deployment/heroku.rst +++ b/cookbook/deployment/heroku.rst @@ -11,7 +11,7 @@ published by Heroku. Setting up ---------- -To setup a new Heroku website, first `signup with Heroku`_ or sign in +To set up a new Heroku website, first `sign up with Heroku`_ or sign in with your credentials. Then download and install the `Heroku Toolbelt`_ on your local computer. @@ -114,7 +114,7 @@ create the ``Procfile`` file and to add it to the repository: Setting the ``prod`` Environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -During a deploy, Heroku runs ``composer install --no-dev`` to install all of the +During a deployment, Heroku runs ``composer install --no-dev`` to install all the dependencies your application requires. However, typical `post-install-commands`_ in ``composer.json``, e.g. to install assets or clear (or pre-warm) caches, run using Symfony's ``dev`` environment by default. @@ -209,7 +209,7 @@ application will respond: You should be seeing your Symfony application in your browser. .. _`the original article`: https://devcenter.heroku.com/articles/getting-started-with-symfony2 -.. _`signup with Heroku`: https://signup.heroku.com/signup/dc +.. _`sign up with Heroku`: https://signup.heroku.com/signup/dc .. _`Heroku Toolbelt`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup .. _`getting Started with PHP on Heroku`: https://devcenter.heroku.com/articles/getting-started-with-php .. _`ephemeral file system`: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem diff --git a/cookbook/deployment/platformsh.rst b/cookbook/deployment/platformsh.rst index a8c086f3ecd..1d73bfdc38a 100644 --- a/cookbook/deployment/platformsh.rst +++ b/cookbook/deployment/platformsh.rst @@ -144,7 +144,7 @@ command that you see on the Platform.sh web UI): ``PROJECT-ID`` Unique identifier of your project. Something like ``kjh43kbobssae`` ``CLUSTER`` - Server location where your project is deplyed. It can be ``eu`` or ``us`` + Server location where your project is deployed. It can be ``eu`` or ``us`` Commit the Platform.sh specific files created in the previous section: diff --git a/cookbook/deployment/tools.rst b/cookbook/deployment/tools.rst index 76992a17c59..095beed34ed 100644 --- a/cookbook/deployment/tools.rst +++ b/cookbook/deployment/tools.rst @@ -192,7 +192,7 @@ Basic scripting: Platform as a Service Providers: - PaaS is a relatively new way to deploy your application. Typically a PaaS + PaaS is a relatively new way to deploy your application. Typically, a PaaS will use a single configuration file in your project's root directory to determine how to build an environment on the fly that supports your software. One provider with confirmed Symfony support is `PagodaBox`_.