Skip to content

Commit 8fadb17

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: (21 commits) [#5352] minor language tweak Updated text about HTTP methods Update http_fundamentals.rst [HttpKernel] Fix use statement [PSR-7] Fix Diactoros link Fixes small typo in data transformers cookbook some tweaks to the data transformers chapter Updated the Symfony Versions Roadmap image Fixed a minor typo Fixed minor issues Use the built-in serializer instead of promoting JMS Removed some information wrongly rebased Style / grammar fixes for the deployment chapter Style / grammar fixes for the controller chapter Style / grammar fixes for the console chapter Removes wrong comma Rewritten 'whether' & removed serial comma Style / grammar fixes for the configuration chapter Style / grammar fixes for the cache chapter Style / grammar fixes for the bundles chapter ...
2 parents 654b36c + 9b88c4b commit 8fadb17

25 files changed

+118
-92
lines changed

book/http_fundamentals.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ delete a specific blog entry, for example:
9696
9797
.. note::
9898

99-
There are actually nine HTTP methods defined by the HTTP specification,
100-
but many of them are not widely used or supported. In reality, many modern
101-
browsers don't even support the ``PUT`` and ``DELETE`` methods.
99+
There are actually nine HTTP methods (also known as verbs) defined by
100+
the HTTP specification, but many of them are not widely used or supported.
101+
In reality, many modern browsers only support ``POST`` and ``GET`` in
102+
HTML forms. Various others are however supported in XMLHttpRequests,
103+
as well as by Symfony's router.
102104

103105
In addition to the first line, an HTTP request invariably contains other
104106
lines of information called request headers. The headers can supply a wide

components/http_kernel/introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ can be used to check if the current request is a "master" or "sub" request.
692692
For example, a listener that only needs to act on the master request may
693693
look like this::
694694

695-
use Symfony\Component\HttpKernel\HttpKernelInterface;
695+
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
696696
// ...
697697

698698
public function onKernelRequest(GetResponseEvent $event)

cookbook/assetic/asset_management.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
9191

9292
You can also include CSS stylesheets: see :ref:`cookbook-assetic-including-css`.
9393

94-
In this example, all of the files in the ``Resources/public/js/`` directory
95-
of the AppBundle will be loaded and served from a different location.
96-
The actual rendered tag might simply look like:
94+
In this example, all files in the ``Resources/public/js/`` directory of the
95+
AppBundle will be loaded and served from a different location. The actual
96+
rendered tag might simply look like:
9797

9898
.. code-block:: html
9999

@@ -357,7 +357,7 @@ Filters
357357
Once they're managed by Assetic, you can apply filters to your assets before
358358
they are served. This includes filters that compress the output of your assets
359359
for smaller file sizes (and better frontend optimization). Other filters
360-
can compile JavaScript file from CoffeeScript files and process SASS into CSS.
360+
can compile CoffeeScript files to JavaScript and process SASS into CSS.
361361
In fact, Assetic has a long list of available filters.
362362

363363
Many of the filters do not do the work directly, but use existing third-party

cookbook/assetic/jpeg_optimize.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
How to Use Assetic for Image Optimization with Twig Functions
55
=============================================================
66

7-
Amongst its many filters, Assetic has four filters which can be used for on-the-fly
7+
Among its many filters, Assetic has four filters which can be used for on-the-fly
88
image optimization. This allows you to get the benefits of smaller file sizes
99
without having to use an image editor to process each image. The results
1010
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:
7070
Removing all EXIF Data
7171
~~~~~~~~~~~~~~~~~~~~~~
7272

73-
By default, the ``jpegoptim`` filter removes some of the meta information stored
73+
By default, the ``jpegoptim`` filter removes some meta information stored
7474
in the image. To remove all EXIF data and comments, set the ``strip_all`` option
7575
to ``true``:
7676

cookbook/assetic/yuicompressor.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Download the YUI Compressor JAR
1818
-------------------------------
1919

2020
The YUI Compressor is written in Java and distributed as a JAR. `Download the JAR`_
21-
from the Yahoo! site and save it to ``app/Resources/java/yuicompressor.jar``.
21+
from the Yahoo! website and save it to ``app/Resources/java/yuicompressor.jar``.
2222

2323
Configure the YUI Filters
2424
-------------------------

cookbook/bundles/configuration.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ The ``Configuration`` class to handle the sample configuration looks like::
210210
supporting "prototype" nodes, advanced validation, XML-specific normalization
211211
and advanced merging. You can read more about this in
212212
:doc:`the Config component documentation </components/config/definition>`. You
213-
can also see it in action by checking out some of the core Configuration
213+
can also see it in action by checking out some core Configuration
214214
classes, such as the one from the `FrameworkBundle Configuration`_ or the
215215
`TwigBundle Configuration`_.
216216

@@ -227,7 +227,7 @@ thrown)::
227227
}
228228

229229
The ``processConfiguration()`` method uses the configuration tree you've defined
230-
in the ``Configuration`` class to validate, normalize and merge all of the
230+
in the ``Configuration`` class to validate, normalize and merge all the
231231
configuration arrays together.
232232

233233
.. tip::
@@ -253,7 +253,7 @@ configuration arrays together.
253253
}
254254

255255
This class uses the ``getConfiguration()`` method to get the Configuration
256-
instance, you should override it if your Configuration class is not called
256+
instance. You should override it if your Configuration class is not called
257257
``Configuration`` or if it is not placed in the same namespace as the
258258
extension.
259259

cookbook/bundles/override.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ In this example you fetch the service definition of the original service, and se
9090
its class name to your own class.
9191

9292
See :doc:`/cookbook/service_container/compiler_passes` for information on how to use
93-
compiler passes. If you want to do something beyond just overriding the class -
94-
like adding a method call - you can only use the compiler pass method.
93+
compiler passes. If you want to do something beyond just overriding the class,
94+
like adding a method call, you can only use the compiler pass method.
9595

9696
Entities & Entity Mapping
9797
-------------------------

cookbook/bundles/prepend_extension.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ often need to be repeated for various bundles.
1515
Using the below approach, it is possible to remove the disadvantage of the
1616
multiple bundle approach by enabling a single Extension to prepend the settings
1717
for any bundle. It can use the settings defined in the ``app/config/config.yml``
18-
to prepend settings just as if they would have been written explicitly by
18+
to prepend settings just as if they had been written explicitly by
1919
the user in the application configuration.
2020

2121
For example, this could be used to configure the entity manager name to use in

cookbook/bundles/remove.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Remove the ``_acme_demo`` entry at the bottom of this file.
5656

5757
Some bundles contain configuration in one of the ``app/config/config*.yml``
5858
files. Be sure to remove the related configuration from these files. You can
59-
quickly spot bundle configuration by looking for a ``acme_demo`` (or whatever
59+
quickly spot bundle configuration by looking for an ``acme_demo`` (or whatever
6060
the name of the bundle is, e.g. ``fos_user`` for the FOSUserBundle) string in
6161
the configuration files.
6262

cookbook/cache/varnish.rst

+11-12
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,16 @@ in the Symfony configuration so that Varnish is seen as a trusted proxy and the
2929
Routing and X-FORWARDED Headers
3030
-------------------------------
3131

32-
If the ``X-Forwarded-Port`` header is not set correctly, Symfony will append
33-
the port where the PHP application is running when generating absolute URLs,
34-
e.g. ``http://example.com:8080/my/path``. To ensure that the Symfony router
35-
generates URLs correctly with Varnish, add the correct port number in the
36-
``X-Forwarded-Port`` header. This port depends on your setup.
37-
38-
Suppose that external connections come in on the default HTTP port 80. For HTTPS
39-
connections, there is another proxy (as Varnish does not do HTTPS itself) on the
40-
default HTTPS port 443 that handles the SSL termination and forwards the requests
41-
as HTTP requests to Varnish with a ``X-Forwarded-Proto`` header. In this case,
42-
add the following to your Varnish configuration:
32+
To ensure that the Symfony Router generates URLs correctly with Varnish,
33+
an ``X-Forwarded-Port`` header must be present for Symfony to use the
34+
correct port number.
35+
36+
This port number corresponds to the port your setup is using to receive external
37+
connections (``80`` is the default value for HTTP connections). If the application
38+
also accepts HTTPS connections, there could be another proxy (as Varnish does
39+
not do HTTPS itself) on the default HTTPS port 443 that handles the SSL termination
40+
and forwards the requests as HTTP requests to Varnish with an ``X-Forwarded-Proto``
41+
header. In this case, you need to add the following configuration snippet:
4342

4443
.. code-block:: varnish4
4544
@@ -192,7 +191,7 @@ Symfony adds automatically:
192191
.. tip::
193192

194193
If you followed the advice about ensuring a consistent caching
195-
behavior, those vcl functions already exist. Just append the code
194+
behavior, those VCL functions already exist. Just append the code
196195
to the end of the function, they won't interfere with each other.
197196

198197
.. index::

cookbook/configuration/apache_router.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You're now all set to use Apache routes.
140140
Additional Tweaks
141141
-----------------
142142

143-
To save a little bit of processing time, change occurrences of ``Request``
143+
To save some processing time, change occurrences of ``Request``
144144
to ``ApacheRequest`` in ``web/app.php``::
145145

146146
// web/app.php

cookbook/configuration/environments.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ How to Master and Create new Environments
55
=========================================
66

77
Every application is the combination of code and a set of configuration that
8-
dictates how that code should function. The configuration may define the
9-
database being used, whether or not something should be cached, or how verbose
10-
logging should be. In Symfony, the idea of "environments" is the idea that
11-
the same codebase can be run using multiple different configurations. For
12-
example, the ``dev`` environment should use configuration that makes development
13-
easy and friendly, while the ``prod`` environment should use a set of configuration
14-
optimized for speed.
8+
dictates how that code should function. The configuration may define the database
9+
being used, if something should be cached or how verbose logging should be.
10+
11+
In Symfony, the idea of "environments" is the idea that the same codebase can be
12+
run using multiple different configurations. For example, the ``dev`` environment
13+
should use configuration that makes development easy and friendly, while the
14+
``prod`` environment should use a set of configuration optimized for speed.
1515

1616
.. index::
1717
single: Environments; Configuration files
@@ -170,10 +170,10 @@ this code and changing the environment string.
170170

171171
Important, but unrelated to the topic of *environments* is the ``false``
172172
argument as the second argument to the ``AppKernel`` constructor. This
173-
specifies whether or not the application should run in "debug mode". Regardless
173+
specifies if the application should run in "debug mode". Regardless
174174
of the environment, a Symfony application can be run with debug mode
175175
set to ``true`` or ``false``. This affects many things in the application,
176-
such as whether or not errors should be displayed or if cache files are
176+
such as if errors should be displayed or if cache files are
177177
dynamically rebuilt on each request. Though not a requirement, debug mode
178178
is generally set to ``true`` for the ``dev`` and ``test`` environments
179179
and ``false`` for the ``prod`` environment.
@@ -322,7 +322,7 @@ The new environment is now accessible via::
322322
.. note::
323323

324324
Some environments, like the ``dev`` environment, are never meant to be
325-
accessed on any deployed server by the general public. This is because
325+
accessed on any deployed server by the public. This is because
326326
certain environments, for debugging purposes, may give too much information
327327
about the application or underlying infrastructure. To be sure these environments
328328
aren't accessible, the front controller is usually protected from external

cookbook/configuration/front_controllers_and_kernel.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The main purpose of the front controller is to create an instance of the
3939
and return the resulting response to the browser.
4040

4141
Because every request is routed through it, the front controller can be
42-
used to perform global initializations prior to setting up the kernel or
42+
used to perform global initialization prior to setting up the kernel or
4343
to `decorate`_ the kernel with additional features. Examples include:
4444

4545
* Configuring the autoloader or adding additional autoloading mechanisms;

cookbook/configuration/pdo_session_storage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ How to Use PdoSessionHandler to Store Sessions in the Database
1313
The default Symfony session storage writes the session information to files.
1414
Most medium to large websites use a database to store the session values
1515
instead of files, because databases are easier to use and scale in a
16-
multi-webserver environment.
16+
multi webserver environment.
1717

1818
Symfony has a built-in solution for database session storage called
1919
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler`.

cookbook/configuration/using_parameters_in_dic.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You have seen how to use configuration parameters within
99
There are special cases such as when you want, for instance, to use the
1010
``%kernel.debug%`` parameter to make the services in your bundle enter
1111
debug mode. For this case there is more work to do in order
12-
to make the system understand the parameter value. By default
12+
to make the system understand the parameter value. By default,
1313
your parameter ``%kernel.debug%`` will be treated as a
1414
simple string. Consider the following example::
1515

cookbook/console/console_command.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ before translating contents::
156156
}
157157
}
158158

159-
However for other services the solution might be more complex. For more details,
159+
However, for other services the solution might be more complex. For more details,
160160
see :doc:`/cookbook/service_container/scopes`.
161161

162162
Invoking other Commands

cookbook/console/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ When using the shell you can choose to run each command in a separate process:
5656
$ php app/console -s --process-isolation
5757
5858
When you do this, the output will not be colorized and interactivity is not
59-
supported so you will need to pass all command params explicitly.
59+
supported so you will need to pass all command parameters explicitly.
6060

6161
.. note::
6262

cookbook/controller/service.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ this works fine, controllers can also be specified as services.
1111

1212
.. note::
1313

14-
Specifying a controller as a service takes a little bit more work. The
14+
Specifying a controller as a service takes a bit more work. The
1515
primary advantage is that the entire controller or any services passed to
1616
the controller can be modified via the service container configuration.
1717
This is especially useful when developing an open-source bundle or any
18-
bundle that will be used in many different projects.
18+
bundle that will be used in different projects.
1919

2020
A second advantage is that your controllers are more "sandboxed". By
2121
looking at the constructor arguments, it's easy to see what types of things

cookbook/deployment/azure-website.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Deploying to Microsoft Azure Website Cloud
66

77
This step by step cookbook describes how to deploy a small Symfony web
88
application to the Microsoft Azure Website cloud platform. It will explain how
9-
to setup a new Azure website including configuring the right PHP version and
9+
to set up a new Azure website including configuring the right PHP version and
1010
global environment variables. The document also shows how to you can leverage
1111
Git and Composer to deploy your Symfony application to the cloud.
1212

1313
Setting up the Azure Website
1414
----------------------------
1515

16-
To setup a new Microsoft Azure Website, first `signup with Azure`_ or sign in
16+
To set up a new Microsoft Azure Website, first `sign up with Azure`_ or sign in
1717
with your credentials. Once you're connected to your `Azure Portal`_ interface,
1818
scroll down to the bottom and select the **New** panel. On this panel, click
1919
**Web Site** and choose **Custom Create**:
@@ -41,7 +41,7 @@ next step.
4141
Step 2: New MySQL Database
4242
~~~~~~~~~~~~~~~~~~~~~~~~~~
4343

44-
On this step, you will be prompted to setup your MySQL database storage with a
44+
On this step, you will be prompted to set up your MySQL database storage with a
4545
database name and a region. The MySQL database storage is provided by Microsoft
4646
in partnership with ClearDB. Choose the same region you selected for the hosting
4747
plan configuration in the previous step.
@@ -114,7 +114,7 @@ the web server.
114114
Choosing a more recent PHP version can greatly improve runtime performance.
115115
PHP 5.5 ships with a new built-in PHP accelerator called OPCache that
116116
replaces APC. On an Azure Website, OPCache is already enabled and there
117-
is no need to install and setup APC.
117+
is no need to install and set up APC.
118118

119119
The following screenshot shows the output of a :phpfunction:`phpinfo` script
120120
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.
171171
longer be necessary.
172172

173173
To get the ``php_intl.dll`` file under your ``site/wwwroot`` directory, simply
174-
access the online **Kudu** tool by browsing to the following url:
174+
access the online **Kudu** tool by browsing to the following URL:
175175

176176
.. code-block:: text
177177
@@ -342,7 +342,7 @@ credentials, CSRF token protection, etc. These parameters come from the
342342
.. image:: /images/cookbook/deployment/azure-website/step-16.png
343343
:alt: Configuring Symfony global parameters
344344

345-
The most important thing in this cookbook is to correctly setup your database
345+
The most important thing in this cookbook is to correctly set up your database
346346
settings. You can get your MySQL database settings on the right sidebar of the
347347
**Azure Website Dashboard** panel. Simply click on the
348348
**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
395395
may have additional commands to execute for setup (see :doc:`/cookbook/deployment/tools`).
396396

397397
Make sure that your application is running by browsing the ``app.php`` front
398-
controller with your web browser and the following url:
398+
controller with your web browser and the following URL:
399399

400400
.. code-block:: bash
401401
@@ -408,7 +408,7 @@ Configure the Web Server
408408
~~~~~~~~~~~~~~~~~~~~~~~~
409409

410410
At this point, the Symfony application has been deployed and works perfectly on
411-
the Azure Website. However, the ``web`` folder is still part of the url, which
411+
the Azure Website. However, the ``web`` folder is still part of the URL, which
412412
you definitely don't want. But don't worry! You can easily configure the web
413413
server to point to the ``web`` folder and remove the ``web`` in the URL (and
414414
guarantee that nobody can access files outside of the ``web`` directory.)
@@ -453,9 +453,9 @@ application, configure it with the following content:
453453
</configuration>
454454
455455
As you can see, the latest rule ``RewriteRequestsToPublic`` is responsible for
456-
rewriting any urls to the ``web/app.php`` front controller which allows you to
456+
rewriting any URLs to the ``web/app.php`` front controller which allows you to
457457
skip the ``web/`` folder in the URL. The first rule called ``BlockAccessToPublic``
458-
matches all url patterns that contain the ``web/`` folder and serves a
458+
matches all URL patterns that contain the ``web/`` folder and serves a
459459
``403 Forbidden`` HTTP response instead. This example is based on Benjamin
460460
Eberlei's sample you can find on GitHub in the `SymfonyAzureEdition`_ bundle.
461461

@@ -471,7 +471,7 @@ and executed on a Microsoft IIS web server. The process is simple and easy
471471
to implement. And as a bonus, Microsoft is continuing to reduce the number
472472
of steps needed so that deployment becomes even easier.
473473

474-
.. _`signup with Azure`: https://signup.live.com/signup.aspx
474+
.. _`sign up with Azure`: https://signup.live.com/signup.aspx
475475
.. _`Azure Portal`: https://manage.windowsazure.com
476476
.. _`PHP MSDN documentation`: http://blogs.msdn.com/b/silverlining/archive/2012/07/10/configuring-php-in-windows-azure-websites-with-user-ini-files.aspx
477477
.. _`git-scm.com`: http://git-scm.com/download

0 commit comments

Comments
 (0)