Skip to content

[WIP] Cookbook grammar and style fixes #4693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cookbook/assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cookbook/assetic/jpeg_optimize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion cookbook/assetic/yuicompressor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------------
Expand Down
6 changes: 3 additions & 3 deletions cookbook/bundles/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </components/config/definition>`. 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`_.

Expand All @@ -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::
Expand All @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions cookbook/bundles/override.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion cookbook/bundles/prepend_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cookbook/bundles/remove.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions cookbook/cache/varnish.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this isn't your fault I want to note that we always try to avoid first person usage. Can we remove "Let's" here completely by rewriting this sentence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wouterj Agreed. Do you have a concrete idea?

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
Expand Down Expand Up @@ -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::
Expand Down
8 changes: 5 additions & 3 deletions cookbook/configuration/apache_router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------------------------
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cookbook/configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/front_controllers_and_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions cookbook/configuration/pdo_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this change. I feel that it puts too much emphasize on "also".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/using_parameters_in_dic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down