From bed8824187bdb7a41f8ba9a071b597883ed4951f Mon Sep 17 00:00:00 2001 From: frne Date: Wed, 24 Dec 2014 08:56:39 +0100 Subject: [PATCH 01/12] Style / grammar fixes for the assetic chapter --- cookbook/assetic/asset_management.rst | 8 ++++---- cookbook/assetic/jpeg_optimize.rst | 4 ++-- cookbook/assetic/yuicompressor.rst | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cookbook/assetic/asset_management.rst b/cookbook/assetic/asset_management.rst index 121a1e9ac46..16dc5d6b568 100644 --- a/cookbook/assetic/asset_management.rst +++ b/cookbook/assetic/asset_management.rst @@ -91,9 +91,9 @@ 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 -of the AppBundle will be loaded and served from a different location. -The actual rendered tag might simply look like: +In this example, all files in the ``Resources/public/js/`` directory of the +AppBundle will be loaded and served from a different location. The actual +rendered tag might simply look like: .. code-block:: html @@ -357,7 +357,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 frontend 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 295bc27dd3a..3007dabf800 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 @@ -70,7 +70,7 @@ It can now be used from a template: Removing all EXIF Data ~~~~~~~~~~~~~~~~~~~~~~ -By default, the ``jpegoptim`` filter removes some of the meta information stored +By default, the ``jpegoptim`` filter removes some meta information stored in the image. To remove all EXIF data and comments, set the ``strip_all`` option to ``true``: diff --git a/cookbook/assetic/yuicompressor.rst b/cookbook/assetic/yuicompressor.rst index 4d537c71c17..ee7474e00fe 100644 --- a/cookbook/assetic/yuicompressor.rst +++ b/cookbook/assetic/yuicompressor.rst @@ -18,7 +18,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 ------------------------- From 2ec4855b59b9cc222a4b6e4984e08142781d996c Mon Sep 17 00:00:00 2001 From: frne Date: Wed, 24 Dec 2014 09:11:20 +0100 Subject: [PATCH 02/12] Style / grammar fixes for the bundles chapter --- cookbook/bundles/configuration.rst | 6 +++--- cookbook/bundles/override.rst | 4 ++-- cookbook/bundles/prepend_extension.rst | 2 +- cookbook/bundles/remove.rst | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cookbook/bundles/configuration.rst b/cookbook/bundles/configuration.rst index 43c5242ed5c..6c2bfb20b20 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 70ba6786dde..dabade0b5eb 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 35deb3731b0..f4a0aff3cc9 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. From ba6f59f3fc4e87d4052cd20ff4dd2dd754f6bd2e Mon Sep 17 00:00:00 2001 From: frne Date: Wed, 24 Dec 2014 09:15:18 +0100 Subject: [PATCH 03/12] Style / grammar fixes for the cache chapter --- cookbook/cache/varnish.rst | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 054269d6393..7df7f710abd 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -29,17 +29,16 @@ in the Symfony configuration so that Varnish is seen as a trusted proxy and the Routing and X-FORWARDED Headers ------------------------------- -If the ``X-Forwarded-Port`` header is not set correctly, Symfony will append -the port where the PHP application is running when generating absolute URLs, -e.g. ``http://example.com:8080/my/path``. To ensure that the Symfony router -generates URLs correctly with Varnish, add the correct port number in the -``X-Forwarded-Port`` header. This port depends on your setup. - -Suppose 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, -add the following to your Varnish configuration: +To ensure that the Symfony Router generates URLs correctly with Varnish, +an ``X-Forwarded-Port`` header must be present for Symfony to use the +correct port number. + +This port number corresponds to the port your setup is using to receive external +connections (``80`` is the default value for HTTP connections). If the application +also accepts HTTPS connections, there could be 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 an ``X-Forwarded-Proto`` +header. In this case, you need to add the following configuration snippet: .. code-block:: varnish4 @@ -192,7 +191,7 @@ Symfony adds automatically: .. tip:: If you followed the advice about ensuring a consistent caching - behavior, 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:: From 21ebbd421f85b27e52c27050453db22b16ab1af1 Mon Sep 17 00:00:00 2001 From: frne Date: Wed, 24 Dec 2014 09:38:30 +0100 Subject: [PATCH 04/12] Style / grammar fixes for the configuration chapter --- cookbook/configuration/apache_router.rst | 2 +- cookbook/configuration/environments.rst | 8 ++++---- cookbook/configuration/front_controllers_and_kernel.rst | 2 +- cookbook/configuration/pdo_session_storage.rst | 4 ++-- cookbook/configuration/using_parameters_in_dic.rst | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cookbook/configuration/apache_router.rst b/cookbook/configuration/apache_router.rst index f4bfbc7cdb6..99f1734f09b 100644 --- a/cookbook/configuration/apache_router.rst +++ b/cookbook/configuration/apache_router.rst @@ -133,7 +133,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 e78c8577f8e..05919e7e769 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, whether 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 @@ -170,10 +170,10 @@ 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. @@ -322,7 +322,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 f1906c16837..b7d00a1bfd8 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 1da69dfc332..03445fadbf1 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 files. 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`. @@ -16,7 +16,7 @@ To use it, you just need to change some parameters in the main configuration fil .. 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 f5c00244797..03bc453bba4 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 the following example:: From 974e17fccc6579a3ab22e05f235c6a4e39c47e7d Mon Sep 17 00:00:00 2001 From: Frank Neff Date: Sun, 28 Dec 2014 13:54:06 +0100 Subject: [PATCH 05/12] Rewritten 'whether' & removed serial comma --- cookbook/configuration/environments.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 05919e7e769..722be814edf 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 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 From a0abc5d3435f2b27c9801dce39e4570c3c2af561 Mon Sep 17 00:00:00 2001 From: Frank Neff Date: Sun, 28 Dec 2014 13:59:14 +0100 Subject: [PATCH 06/12] Removes wrong comma --- cookbook/bundles/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/bundles/configuration.rst b/cookbook/bundles/configuration.rst index 6c2bfb20b20..f04f1018ccf 100644 --- a/cookbook/bundles/configuration.rst +++ b/cookbook/bundles/configuration.rst @@ -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. From 136230fca753bed1d7275bf7f41ad2b45cae176f Mon Sep 17 00:00:00 2001 From: frne Date: Sun, 28 Dec 2014 16:09:39 +0100 Subject: [PATCH 07/12] Style / grammar fixes for the console chapter --- cookbook/console/console_command.rst | 2 +- cookbook/console/usage.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/console/console_command.rst b/cookbook/console/console_command.rst index 028e85f423f..7cbaba616d1 100644 --- a/cookbook/console/console_command.rst +++ b/cookbook/console/console_command.rst @@ -147,7 +147,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 dc3495261c9..6275f760aa0 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:: From c56f9126344cd2fe1ecac31270de405e459b772e Mon Sep 17 00:00:00 2001 From: frne Date: Sun, 28 Dec 2014 16:13:49 +0100 Subject: [PATCH 08/12] Style / grammar fixes for the controller chapter --- cookbook/controller/service.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/controller/service.rst b/cookbook/controller/service.rst index 4fa3af4deb5..7b077c0f0e0 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 From 2af84eb33f1a4f31ca0de7d239f036b0eca416d9 Mon Sep 17 00:00:00 2001 From: frne Date: Sun, 28 Dec 2014 18:31:08 +0100 Subject: [PATCH 09/12] Style / grammar fixes for the deployment chapter --- cookbook/deployment/azure-website.rst | 22 +++++++-------- cookbook/deployment/heroku.rst | 6 ++--- cookbook/deployment/tools.rst | 39 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 14 deletions(-) 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 57e8c89666e..7ed6216eef9 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. @@ -133,7 +133,7 @@ create the ``Procfile`` file and to add it to the repository: 2) Set the Environment to prod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -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. @@ -325,7 +325,7 @@ This is also very useful to build assets on the production system, e.g. with Ass `Grunt`_ or `gulp`_. .. _`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/tools.rst b/cookbook/deployment/tools.rst index 322154ba9f2..e32832d8d25 100644 --- a/cookbook/deployment/tools.rst +++ b/cookbook/deployment/tools.rst @@ -189,6 +189,45 @@ Don't forget that deploying your application also involves updating any dependen (typically via Composer), migrating your database, clearing your cache and other potential things like pushing assets to a CDN (see `Common Post-Deployment Tasks`_). +The Tools +--------- + +`Capifony`_: + + This tool provides a specialized set of tools on top of Capistrano, tailored + specifically to symfony and Symfony projects. + +`sf2debpkg`_: + + This tool helps you build a native Debian package for your Symfony project. + +`Magallanes`_: + + This Capistrano-like deployment tool is built in PHP, and may be easier + for PHP developers to extend for their needs. + +Bundles: + + There are many `bundles that add deployment features`_ directly into your + Symfony console. + +Basic scripting: + + You can of course use shell, `Ant`_, or any other build tool to script + the deploying of your project. + +Platform as a Service Providers: + + 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`_. + +.. tip:: + + Looking for more? Talk to the community on the `Symfony IRC channel`_ #symfony + (on freenode) for more information. + .. _`Capifony`: http://capifony.org/ .. _`Capistrano`: http://capistranorb.com/ .. _`sf2debpkg`: https://github.com/liip/sf2debpkg From a75cc152bdcc4fc3b443d4f7c2c9357ef9397893 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 23 Jun 2015 15:57:00 +0200 Subject: [PATCH 10/12] Removed some information wrongly rebased --- cookbook/deployment/tools.rst | 39 ----------------------------------- 1 file changed, 39 deletions(-) diff --git a/cookbook/deployment/tools.rst b/cookbook/deployment/tools.rst index e32832d8d25..322154ba9f2 100644 --- a/cookbook/deployment/tools.rst +++ b/cookbook/deployment/tools.rst @@ -189,45 +189,6 @@ Don't forget that deploying your application also involves updating any dependen (typically via Composer), migrating your database, clearing your cache and other potential things like pushing assets to a CDN (see `Common Post-Deployment Tasks`_). -The Tools ---------- - -`Capifony`_: - - This tool provides a specialized set of tools on top of Capistrano, tailored - specifically to symfony and Symfony projects. - -`sf2debpkg`_: - - This tool helps you build a native Debian package for your Symfony project. - -`Magallanes`_: - - This Capistrano-like deployment tool is built in PHP, and may be easier - for PHP developers to extend for their needs. - -Bundles: - - There are many `bundles that add deployment features`_ directly into your - Symfony console. - -Basic scripting: - - You can of course use shell, `Ant`_, or any other build tool to script - the deploying of your project. - -Platform as a Service Providers: - - 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`_. - -.. tip:: - - Looking for more? Talk to the community on the `Symfony IRC channel`_ #symfony - (on freenode) for more information. - .. _`Capifony`: http://capifony.org/ .. _`Capistrano`: http://capistranorb.com/ .. _`sf2debpkg`: https://github.com/liip/sf2debpkg From 797aab7adb61d785631c863dcddba963b750669e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 24 Jun 2015 08:53:07 +0200 Subject: [PATCH 11/12] Fixed minor issues --- cookbook/configuration/environments.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 722be814edf..4f40b9d3d2d 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -5,13 +5,13 @@ 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, 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 -easy and friendly, while the ``prod`` environment should use a set of configuration -optimized for speed. +dictates how that code should function. The configuration may define the 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 easy and friendly, while the +``prod`` environment should use a set of configuration optimized for speed. .. index:: single: Environments; Configuration files From 1cff82669740d020f2ed86cb6155870cf8ffafdb Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 30 Jun 2015 16:11:52 +0200 Subject: [PATCH 12/12] Fixed a minor typo --- cookbook/cache/varnish.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 7df7f710abd..39b686872f5 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -191,7 +191,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 + behavior, those VCL functions already exist. Just append the code to the end of the function, they won't interfere with each other. .. index::