Skip to content

Commit 94b833e

Browse files
committed
minor #4679 General grammar and style fixes in the book (frne)
This PR was merged into the 2.3 branch. Discussion ---------- General grammar and style fixes in the book Contains numerous grammar, style and readability fixes (see diff) | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | >= 2.3 | Fixed tickets | Commits ------- 86d7a6d Some more fixes after proofreading 5c754e0 Fixes incorrect latin abbrev 7e4904f Merge remote-tracking branch 'upstream/2.3' into general-grammar-and-style-fixes 1da061c Some general grammar and style fixes in the book
2 parents cad4d3f + 86d7a6d commit 94b833e

13 files changed

+52
-52
lines changed

book/doctrine.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ for you:
119119
.. sidebar:: Setting up the Database to be UTF8
120120

121121
One mistake even seasoned developers make when starting a Symfony project
122-
is forgetting to setup default charset and collation on their database,
122+
is forgetting to set up default charset and collation on their database,
123123
ending up with latin type collations, which are default for most databases.
124124
They might even remember to do it the very first time, but forget that
125125
it's all gone after running a relatively common command during development:
@@ -339,7 +339,7 @@ see the :ref:`book-doctrine-field-types` section.
339339

340340
You can also check out Doctrine's `Basic Mapping Documentation`_ for
341341
all details about mapping information. If you use annotations, you'll
342-
need to prepend all annotations with ``ORM\`` (e.g. ``ORM\Column(..)``),
342+
need to prepend all annotations with ``ORM\`` (e.g. ``ORM\Column(...)``),
343343
which is not shown in Doctrine's documentation. You'll also need to include
344344
the ``use Doctrine\ORM\Mapping as ORM;`` statement, which *imports* the
345345
``ORM`` annotations prefix.
@@ -357,7 +357,7 @@ see the :ref:`book-doctrine-field-types` section.
357357

358358
.. note::
359359

360-
When using another library or program (ie. Doxygen) that uses annotations,
360+
When using another library or program (e.g. Doxygen) that uses annotations,
361361
you should place the ``@IgnoreAnnotation`` annotation on the class to
362362
indicate which annotations Symfony should ignore.
363363

@@ -385,7 +385,7 @@ a regular PHP class, you need to create getter and setter methods (e.g. ``getNam
385385
386386
$ php app/console doctrine:generate:entities AppBundle/Entity/Product
387387
388-
This command makes sure that all of the getters and setters are generated
388+
This command makes sure that all the getters and setters are generated
389389
for the ``Product`` class. This is a safe command - you can run it over and
390390
over again: it only generates getters and setters that don't exist (i.e. it
391391
doesn't replace your existing methods).
@@ -432,7 +432,7 @@ mapping information) of a bundle or an entire namespace:
432432
.. note::
433433

434434
Doctrine doesn't care whether your properties are ``protected`` or ``private``,
435-
or whether or not you have a getter or setter function for a property.
435+
or whether you have a getter or setter function for a property.
436436
The getters and setters are generated here only because you'll need them
437437
to interact with your PHP object.
438438

@@ -770,7 +770,7 @@ already did in the previous section).
770770

771771
The DQL syntax is incredibly powerful, allowing you to easily join between
772772
entities (the topic of :ref:`relations <book-doctrine-relations>` will be
773-
covered later), group, etc. For more information, see the official Doctrine
773+
covered later), group, etc. For more information, see the official
774774
`Doctrine Query Language`_ documentation.
775775

776776
Custom Repository Classes
@@ -833,7 +833,7 @@ used earlier to generate the missing getter and setter methods:
833833
$ php app/console doctrine:generate:entities AppBundle
834834
835835
Next, add a new method - ``findAllOrderedByName()`` - to the newly generated
836-
repository class. This method will query for all of the ``Product`` entities,
836+
repository class. This method will query for all the ``Product`` entities,
837837
ordered alphabetically.
838838

839839
.. code-block:: php
@@ -1352,7 +1352,7 @@ Doctrine's `Lifecycle Events documentation`_.
13521352
transforming data in the entity (e.g. setting a created/updated field,
13531353
generating a slug value).
13541354

1355-
If you need to do some heavier lifting - like perform logging or send
1355+
If you need to do some heavier lifting - like performing logging or sending
13561356
an email - you should register an external class as an event listener
13571357
or subscriber and give it access to whatever resources you need. For
13581358
more information, see :doc:`/cookbook/doctrine/event_listeners_subscribers`.
@@ -1362,7 +1362,7 @@ Doctrine's `Lifecycle Events documentation`_.
13621362
Doctrine Field Types Reference
13631363
------------------------------
13641364

1365-
Doctrine comes with a large number of field types available. Each of these
1365+
Doctrine comes with numerous field types available. Each of these
13661366
maps a PHP data type to a specific column type in whatever database you're
13671367
using. For each field type, the ``Column`` can be configured further, setting
13681368
the ``length``, ``nullable`` behavior, ``name`` and other options. To see a

book/forms.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ That's it! Just three lines are needed to render the complete form:
172172
when using file uploads.
173173

174174
``form_widget(form)``
175-
Renders all of the fields, which includes the field element itself, a label
175+
Renders all the fields, which includes the field element itself, a label
176176
and any validation error messages for the field.
177177

178178
``form_end()``

book/from_flat_php_to_symfony2.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ is primarily an HTML file that uses a template-like PHP syntax:
126126
</body>
127127
</html>
128128

129-
By convention, the file that contains all of the application logic - ``index.php`` -
129+
By convention, the file that contains all the application logic - ``index.php`` -
130130
is known as a "controller". The term :term:`controller` is a word you'll hear
131131
a lot, regardless of the language or framework you use. It refers simply
132132
to the area of *your* code that processes user input and prepares the response.
@@ -244,8 +244,8 @@ the layout:
244244

245245
<?php include 'layout.php' ?>
246246

247-
You've now introduced a methodology that allows for the reuse of the
248-
layout. Unfortunately, to accomplish this, you're forced to use a few ugly
247+
You now have a setup that will allow you to reuse the layout.
248+
Unfortunately, to accomplish this, you're forced to use a few ugly
249249
PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony
250250
uses a Templating component that allows this to be accomplished cleanly
251251
and easily. You'll see it in action shortly.

book/http_cache.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Here is a list of the main options:
236236
(default: ``60``). This setting is overridden by the ``stale-if-error`` HTTP
237237
``Cache-Control`` extension (see RFC 5861).
238238

239-
If ``debug`` is ``true``, Symfony automatically adds a ``X-Symfony-Cache``
239+
If ``debug`` is ``true``, Symfony automatically adds an ``X-Symfony-Cache``
240240
header to the response containing useful information about cache hits and
241241
misses.
242242

@@ -427,7 +427,7 @@ on a cache to store and return "fresh" responses.
427427
model of the specification dominates your work. Unfortunately, the actual
428428
specification document - `RFC 2616`_ - can be difficult to read.
429429

430-
There is an on-going effort (`HTTP Bis`_) to rewrite the RFC 2616. It does
430+
There is an ongoing effort (`HTTP Bis`_) to rewrite the RFC 2616. It does
431431
not describe a new version of HTTP, but mostly clarifies the original HTTP
432432
specification. The organization is also improved as the specification
433433
is split into seven parts; everything related to HTTP caching can be
@@ -482,7 +482,7 @@ The resulting HTTP header will look like this:
482482
timezone as required by the specification.
483483

484484
Note that in HTTP versions before 1.1 the origin server wasn't required to
485-
send the ``Date`` header. Consequently the cache (e.g. the browser) might
485+
send the ``Date`` header. Consequently, the cache (e.g. the browser) might
486486
need to rely on the local clock to evaluate the ``Expires`` header making
487487
the lifetime calculation vulnerable to clock skew. Another limitation
488488
of the ``Expires`` header is that the specification states that "HTTP/1.1
@@ -528,9 +528,9 @@ won't be asked to return the updated response until the cache finally becomes
528528
stale.
529529

530530
The validation model addresses this issue. Under this model, the cache continues
531-
to store responses. The difference is that, for each request, the cache asks
532-
the application whether or not the cached response is still valid. If the
533-
cache *is* still valid, your application should return a 304 status code
531+
to store responses. The difference is that, for each request, the cache asks the
532+
application if the cached response is still valid or if it needs to be regenerated.
533+
If the cache *is* still valid, your application should return a 304 status code
534534
and no content. This tells the cache that it's ok to return the cached response.
535535

536536
Under this model, you only save CPU if you're able to determine that the

book/http_fundamentals.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ how you develop on the web, the goal of your server is *always* to understand
3838
simple text requests, and return simple text responses.
3939

4040
Symfony is built from the ground up around that reality. Whether you realize
41-
it or not, HTTP is something you use everyday. With Symfony, you'll learn
41+
it or not, HTTP is something you use every day. With Symfony, you'll learn
4242
how to master it.
4343

4444
.. index::
@@ -542,7 +542,7 @@ regardless of how your project is developed. To name a few:
542542
:doc:`Translation </components/translation/introduction>`
543543
A framework for translating strings in your application.
544544

545-
Each and every one of these components is decoupled and can be used in *any*
545+
Each one of these components is decoupled and can be used in *any*
546546
PHP project, regardless of whether or not you use the Symfony framework.
547547
Every part is made to be used if needed and replaced when necessary.
548548

book/installation.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ If there are any issues, correct them now before moving on.
279279
Updating Symfony Applications
280280
-----------------------------
281281

282-
At this point, you've create a fully-functional Symfony application in which
282+
At this point, you've created a fully-functional Symfony application in which
283283
you'll start to develop your own project. A Symfony application depends on
284284
a number of external libraries. These are downloaded into the ``vendor/`` directory
285285
and they are managed exclusively by Composer.
@@ -326,10 +326,10 @@ If you're using a version control system like `Git`_, you can safely commit all
326326
your project's code. The reason is that Symfony applications already contain a
327327
``.gitignore`` file specially prepared for Symfony.
328328

329-
For specific instructions on how best to setup your project to be stored
329+
For specific instructions on how best to set up your project to be stored
330330
in Git, see :doc:`/cookbook/workflow/new_project_git`.
331331

332-
Checking out a Versioned Symfony Application
332+
Checking out a versioned Symfony Application
333333
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
334334

335335
When using Composer to manage application's dependencies, it's recommended to

book/page_creation.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Before you begin: Create the Bundle
9393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9494

9595
Before you begin, you'll need to create a *bundle*. In Symfony, a :term:`bundle`
96-
is like a plugin, except that all of the code in your application will live
96+
is like a plugin, except that all the code in your application will live
9797
inside a bundle.
9898

9999
A bundle is nothing more than a directory that houses everything related
@@ -108,7 +108,7 @@ create the route.
108108

109109
To create a bundle called ``AcmeDemoBundle`` (a play bundle that you'll
110110
build in this chapter), run the following command and follow the on-screen
111-
instructions (use all of the default options):
111+
instructions (use all the default options):
112112

113113
.. code-block:: bash
114114
@@ -327,7 +327,7 @@ An optional, but common, third step in the process is to create a template.
327327
Optional Step 3: Create the Template
328328
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
329329

330-
Templates allow you to move all of the presentation (e.g. HTML code) into
330+
Templates allow you to move all the presentation code (e.g. HTML) into
331331
a separate file and reuse different portions of the page layout. Instead
332332
of writing the HTML inside the controller, render a template instead:
333333

@@ -607,7 +607,7 @@ You'll learn more about each of these directories in later chapters.
607607
The Source (``src``) Directory
608608
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
609609

610-
Put simply, the ``src/`` directory contains all of the actual code (PHP code,
610+
Put simply, the ``src/`` directory contains all the actual code (PHP code,
611611
templates, configuration files, stylesheets, etc) that drives *your* application.
612612
When developing, the vast majority of your work will be done inside one or
613613
more bundles that you create in this directory.
@@ -788,7 +788,7 @@ bundle.
788788
Application Configuration
789789
-------------------------
790790

791-
An application consists of a collection of bundles representing all of the
791+
An application consists of a collection of bundles representing all the
792792
features and capabilities of your application. Each bundle can be customized
793793
via configuration files written in YAML, XML or PHP. By default, the main
794794
configuration file lives in the ``app/config/`` directory and is called

book/security.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Firewalls (Authentication)
171171

172172
When a user makes a request to a URL that's protected by a firewall, the
173173
security system is activated. The job of the firewall is to determine whether
174-
or not the user needs to be authenticated, and if they do, to send a response
174+
the user needs to be authenticated, and if they do, to send a response
175175
back to the user initiating the authentication process.
176176

177177
A firewall is activated when the URL of an incoming request matches the configured
@@ -708,7 +708,7 @@ see :doc:`/cookbook/security/form_login`.
708708
Next, make sure that your ``check_path`` URL (e.g. ``/login_check``)
709709
is behind the firewall you're using for your form login (in this example,
710710
the single firewall matches *all* URLs, including ``/login_check``). If
711-
``/login_check`` doesn't match any firewall, you'll receive a ``Unable
711+
``/login_check`` doesn't match any firewall, you'll receive an ``Unable
712712
to find the controller for path "/login_check"`` exception.
713713

714714
**4. Multiple firewalls don't share security context**
@@ -825,7 +825,7 @@ things:
825825
...................
826826

827827
Symfony creates an instance of :class:`Symfony\\Component\\HttpFoundation\\RequestMatcher`
828-
for each ``access_control`` entry, which determines whether or not a given
828+
for each ``access_control`` entry, which determines whether a given
829829
access control should be used on this request. The following ``access_control``
830830
options are used for matching:
831831

@@ -1458,7 +1458,7 @@ key in ``app/config/security.yml``.
14581458

14591459
When you allow a user to submit a plaintext password (e.g. registration
14601460
form, change password form), you *must* have validation that guarantees
1461-
that the password is 4096 characters or less. Read more details in
1461+
that the password is 4096 characters or fewer. Read more details in
14621462
:ref:`How to implement a simple Registration Form <cookbook-registration-password-max>`.
14631463

14641464
Retrieving the User Object
@@ -1659,7 +1659,7 @@ Roles
16591659

16601660
The idea of a "role" is key to the authorization process. Each user is assigned
16611661
a set of roles and then each resource requires one or more roles. If the user
1662-
has any one of the required roles, access is granted. Otherwise access is denied.
1662+
has any one of the required roles, access is granted. Otherwise, access is denied.
16631663

16641664
Roles are pretty simple, and are basically strings that you can invent and
16651665
use as needed (though roles are objects internally). For example, if you
@@ -2062,7 +2062,7 @@ Security can be a deep and complex issue to solve correctly in your application.
20622062
Fortunately, Symfony's Security component follows a well-proven security
20632063
model based around *authentication* and *authorization*. Authentication,
20642064
which always happens first, is handled by a firewall whose job is to determine
2065-
the identity of the user through several different methods (e.g. HTTP authentication,
2065+
the identity of the user through several methods (e.g. HTTP authentication,
20662066
login form, etc). In the cookbook, you'll find examples of other methods
20672067
for handling authentication, including how to implement a "remember me" cookie
20682068
functionality.

book/service_container.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ is never created. This saves memory and increases the speed of your application.
174174
This also means that there's very little or no performance hit for defining
175175
lots of services. Services that are never used are never constructed.
176176

177-
As an added bonus, the ``Mailer`` service is only created once and the same
177+
As a bonus, the ``Mailer`` service is only created once and the same
178178
instance is returned each time you ask for the service. This is almost always
179179
the behavior you'll need (it's more flexible and powerful), but you'll learn
180180
later how you can configure a service that has multiple instances in the
@@ -525,7 +525,7 @@ In this case, the extension allows you to customize the ``error_handler``,
525525
the FrameworkBundle uses the options specified here to define and configure
526526
the services specific to it. The bundle takes care of creating all the necessary
527527
``parameters`` and ``services`` for the service container, while still allowing
528-
much of the configuration to be easily customized. As an added bonus, most
528+
much of the configuration to be easily customized. As a bonus, most
529529
service container extensions are also smart enough to perform validation -
530530
notifying you of options that are missing or the wrong data type.
531531

@@ -964,7 +964,7 @@ console. To show all services and the class for each service, run:
964964
965965
$ php app/console container:debug
966966
967-
By default only public services are shown, but you can also view private services:
967+
By default, only public services are shown, but you can also view private services:
968968

969969
.. code-block:: bash
970970

book/templating.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ Referencing Templates in a Bundle
408408
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
409409

410410
Symfony uses a **bundle**:**directory**:**filename** string syntax for
411-
templates that live inside a bundle. This allows for several different types of
411+
templates that live inside a bundle. This allows for several types of
412412
templates, each which lives in a specific location:
413413

414414
* ``AcmeBlogBundle:Blog:index.html.twig``: This syntax is used to specify a
@@ -504,7 +504,7 @@ Including other Templates
504504
~~~~~~~~~~~~~~~~~~~~~~~~~
505505

506506
You'll often want to include the same template or code fragment on several
507-
different pages. For example, in an application with "news articles", the
507+
pages. For example, in an application with "news articles", the
508508
template code displaying an article might be used on the article detail page,
509509
on a page displaying the most popular articles, or in a list of the latest
510510
articles.
@@ -1521,7 +1521,7 @@ Templates are a generic way to render content in *any* format. And while in
15211521
most cases you'll use templates to render HTML content, a template can just
15221522
as easily generate JavaScript, CSS, XML or any other format you can dream of.
15231523

1524-
For example, the same "resource" is often rendered in several different formats.
1524+
For example, the same "resource" is often rendered in several formats.
15251525
To render an article index page in XML, simply include the format in the
15261526
template name:
15271527

book/testing.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Unit Tests
4747
A unit test is usually a test against a specific PHP class. If you want to
4848
test the overall behavior of your application, see the section about `Functional Tests`_.
4949

50-
Writing Symfony unit tests is no different than writing standard PHPUnit
50+
Writing Symfony unit tests is no different from writing standard PHPUnit
5151
unit tests. Suppose, for example, that you have an *incredibly* simple class
5252
called ``Calculator`` in the ``Utility/`` directory of your bundle::
5353

@@ -622,7 +622,7 @@ Just like links, you select forms with the ``selectButton()`` method::
622622
button.
623623

624624
The ``selectButton()`` method can select ``button`` tags and submit ``input``
625-
tags. It uses several different parts of the buttons to find them:
625+
tags. It uses several parts of the buttons to find them:
626626

627627
* The ``value`` attribute value;
628628

@@ -775,7 +775,7 @@ PHPUnit Configuration
775775

776776
Each application has its own PHPUnit configuration, stored in the
777777
``app/phpunit.xml.dist`` file. You can edit this file to change the defaults or
778-
create an ``app/phpunit.xml`` file to setup a configuration for your local
778+
create an ``app/phpunit.xml`` file to set up a configuration for your local
779779
machine only.
780780

781781
.. tip::

0 commit comments

Comments
 (0)