-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[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
Changes from 4 commits
4588313
9de9f70
9c7c42d
b47169c
393d50c
74ed749
aee8923
5bb1ed4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,11 @@ How to Install 3rd Party Bundles | |
Most bundles provide their own installation instructions. However, the | ||
basic steps for installing a bundle are the same: | ||
|
||
* `A) Add Composer Dependencies`_ | ||
* `B) Enable the Bundle`_ | ||
* `C) Configure the Bundle`_ | ||
* `a) Add Composer Dependencies`_ | ||
* `b) Enable the Bundle`_ | ||
* `c) Configure the Bundle`_ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'm a bit in favor of using uppercase letters here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel the same since they are part of the headlines. |
||
|
||
A) Add Composer Dependencies | ||
a) Add Composer Dependencies | ||
---------------------------- | ||
|
||
Dependencies are managed with Composer, so if Composer is new to you, learn | ||
|
@@ -43,7 +43,7 @@ and download the library into the ``vendor/`` directory. If you need a specific | |
version, add a ``:`` and the version right after the library name (see | ||
`composer require`_). | ||
|
||
B) Enable the Bundle | ||
b) Enable the Bundle | ||
-------------------- | ||
|
||
At this point, the bundle is installed in your Symfony project (in | ||
|
@@ -68,7 +68,7 @@ The only thing you need to do now is register the bundle in ``AppKernel``:: | |
} | ||
} | ||
|
||
C) Configure the Bundle | ||
c) Configure the Bundle | ||
----------------------- | ||
|
||
It's pretty common for a bundle to need some additional setup or configuration | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
@@ -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:: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
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. | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't your mistake, but these lines look too long. Can you wrap each after the first word that crosses the 72nd character? |
||
|
||
Change Router Configuration Parameters | ||
|
@@ -122,7 +122,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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you please also remove the serial comma before "or"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we removed "or not", I'd prefer to use "if" instead of "whether". However, I liked the way it was before more than the current wording. |
||
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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xabbuh IMHO, there has to be one: http://www.englishrules.com/writing/2005/comma-with-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. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comma is wrong, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought this is a subordinate clause: http://www.chompchomp.com/terms/subordinateclause.htm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xabbuh My fault, the subordinate clause ist at the second part, therefore no comma. You're right.