Skip to content

Commit a78c6e4

Browse files
committed
Merge pull request #3213 from bicpi/even_more_fixes
Minor fixes: Typos, Formatting, Notations
2 parents d889519 + 4299eb1 commit a78c6e4

11 files changed

+31
-28
lines changed

book/doctrine.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ in a way that makes sense for your needs. The fact that the data needs to
10871087
be persisted to a database is always secondary.
10881088

10891089
Now, look at the metadata above the ``$category`` property on the ``Product``
1090-
class. The information here tells doctrine that the related class is ``Category``
1090+
class. The information here tells Doctrine that the related class is ``Category``
10911091
and that it should store the ``id`` of the category record on a ``category_id``
10921092
field that lives on the ``product`` table. In other words, the related ``Category``
10931093
object will be stored on the ``$category`` property, but behind the scenes,
@@ -1285,7 +1285,7 @@ More Information on Associations
12851285

12861286
This section has been an introduction to one common type of entity relationship,
12871287
the one-to-many relationship. For more advanced details and examples of how
1288-
to use other types of relations (e.g. ``one-to-one``, ``many-to-many``), see
1288+
to use other types of relations (e.g. one-to-one, many-to-many), see
12891289
Doctrine's `Association Mapping Documentation`_.
12901290

12911291
.. note::

book/forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ Form Fragment Naming
12861286
~~~~~~~~~~~~~~~~~~~~
12871287
12881288
In Symfony, every part of a form that is rendered - HTML form elements, errors,
1289-
labels, etc - is defined in a base theme, which is a collection of blocks
1289+
labels, etc. - is defined in a base theme, which is a collection of blocks
12901290
in Twig and a collection of template files in PHP.
12911291
12921292
In Twig, every block needed is defined in a single template file (`form_div_layout.html.twig`_)

cookbook/doctrine/event_listeners_subscribers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ entity), you should check for the entity's class type in your method
157157
Creating the Subscriber Class
158158
-----------------------------
159159

160-
A doctrine event subscriber must implement the ``Doctrine\Common\EventSubscriber``
160+
A Doctrine event subscriber must implement the ``Doctrine\Common\EventSubscriber``
161161
interface and have an event method for each event it subscribes to::
162162

163163
// src/Acme/SearchBundle/EventListener/SearchIndexerSubscriber.php
164164
namespace Acme\SearchBundle\EventListener;
165165

166166
use Doctrine\Common\EventSubscriber;
167167
use Doctrine\ORM\Event\LifecycleEventArgs;
168-
// for doctrine 2.4: Doctrine\Common\Persistence\Event\LifecycleEventArgs;
168+
// for Doctrine 2.4: Doctrine\Common\Persistence\Event\LifecycleEventArgs;
169169
use Acme\StoreBundle\Entity\Product;
170170

171171
class SearchIndexerSubscriber implements EventSubscriber

cookbook/doctrine/file_uploads.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ If you choose to, you can also integrate the file upload into your entity
1313
lifecycle (i.e. creation, update and removal). In this case, as your entity
1414
is created, updated, and removed from Doctrine, the file uploading and removal
1515
processing will take place automatically (without needing to do anything in
16-
your controller);
16+
your controller).
1717

1818
To make this work, you'll need to take care of a number of details, which
1919
will be covered in this cookbook entry.
2020

2121
Basic Setup
2222
-----------
2323

24-
First, create a simple ``Doctrine`` Entity class to work with::
24+
First, create a simple Doctrine entity class to work with::
2525

2626
// src/Acme/DemoBundle/Entity/Document.php
2727
namespace Acme\DemoBundle\Entity;
@@ -454,7 +454,7 @@ call to ``$document->upload()`` should be removed from the controller::
454454
.. caution::
455455

456456
The ``PreUpdate`` and ``PostUpdate`` callbacks are only triggered if there
457-
is a change in one of the entity's field that are persisted. This means
457+
is a change in one of the entity's fields that are persisted. This means
458458
that, by default, if you modify only the ``$file`` property, these events
459459
will not be triggered, as the property itself is not directly persisted
460460
via Doctrine. One solution would be to use an ``updated`` field that's

cookbook/doctrine/multiple_entity_managers.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ You can now use Doctrine just as you did before - using the ``default`` entity
200200
manager to persist and fetch entities that it manages and the ``customer``
201201
entity manager to persist and fetch its entities.
202202

203-
The same applies to repository call::
203+
The same applies to repository calls::
204204

205205
class UserController extends Controller
206206
{
@@ -225,3 +225,4 @@ The same applies to repository call::
225225
;
226226
}
227227
}
228+

cookbook/doctrine/registration_form.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ the class.
9090

9191
.. sidebar:: Why the 4096 Password Limit?
9292

93-
Notice that the ``plainPassword`` has a max length of ``4096`` characters.
93+
Notice that the ``plainPassword`` field has a max length of 4096 characters.
9494
For security purposes (`CVE-2013-5750`_), Symfony limits the plain password
9595
length to 4096 characters when encoding it. Adding this constraint makes
9696
sure that your form will give a validation error if anyone tries a super-long
@@ -139,8 +139,8 @@ Next, create the form for the ``User`` model::
139139
}
140140

141141
There are just two fields: ``email`` and ``plainPassword`` (repeated to confirm
142-
the entered password). The ``data_class`` option tells the form the name of
143-
data class (i.e. your ``User`` entity).
142+
the entered password). The ``data_class`` option tells the form the name of the
143+
underlying data class (i.e. your ``User`` entity).
144144

145145
.. tip::
146146

@@ -224,7 +224,7 @@ Next, create the form for this ``Registration`` model::
224224
}
225225
}
226226

227-
You don't need to use special method for embedding the ``UserType`` form.
227+
You don't need to use a special method for embedding the ``UserType`` form.
228228
A form is a field, too - so you can add this like any other field, with the
229229
expectation that the ``Registration.user`` property will hold an instance
230230
of the ``User`` class.
@@ -260,7 +260,7 @@ controller for displaying the registration form::
260260
}
261261
}
262262

263-
and its template:
263+
And its template:
264264

265265
.. code-block:: html+jinja
266266

@@ -356,6 +356,8 @@ Update your Database Schema
356356
Of course, since you've added a ``User`` entity during this tutorial, make
357357
sure that your database schema has been updated properly:
358358

359+
.. code-block:: bash
360+
359361
$ php app/console doctrine:schema:update --force
360362
361363
That's it! Your form now validates, and allows you to save the ``User``

cookbook/doctrine/reverse_engineering.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ entity in the ``BlogComment`` entity class.
167167

168168
.. note::
169169

170-
If you want to have a ``oneToMany`` relationship, you will need to add
171-
it manually into the entity or to the generated ``xml`` or ``yml`` files.
172-
Add a section on the specific entities for ``oneToMany`` defining the
170+
If you want to have a one-to-many relationship, you will need to add
171+
it manually into the entity or to the generated XML or YAML files.
172+
Add a section on the specific entities for one-to-many defining the
173173
``inversedBy`` and the ``mappedBy`` pieces.
174174

175175
The generated entities are now ready to be used. Have fun!

cookbook/form/form_collections.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ we talk about next!).
560560
}
561561
}
562562

563-
If you have a ``OneToMany`` relationship, then the workaround is similar,
563+
If you have a one-to-many relationship, then the workaround is similar,
564564
except that you can simply call ``setTask`` from inside ``addTag``.
565565

566566
.. _cookbook-form-collections-remove:
@@ -657,11 +657,11 @@ the relationship between the removed ``Tag`` and ``Task`` object.
657657
``Tag`` is properly removed.
658658

659659
In Doctrine, you have two side of the relationship: the owning side and the
660-
inverse side. Normally in this case you'll have a ``ManyToMany`` relation
660+
inverse side. Normally in this case you'll have a many-to-many relation
661661
and the deleted tags will disappear and persist correctly (adding new
662662
tags also works effortlessly).
663663

664-
But if you have an ``OneToMany`` relation or a ``ManyToMany`` with a
664+
But if you have an one-to-many relation or a many-to-many with a
665665
``mappedBy`` on the Task entity (meaning Task is the "inverse" side),
666666
you'll need to do more work for the removed tags to persist correctly.
667667

@@ -709,7 +709,7 @@ the relationship between the removed ``Tag`` and ``Task`` object.
709709
// remove the Task from the Tag
710710
$tag->getTasks()->removeElement($task);
711711

712-
// if it were a ManyToOne relationship, remove the relationship like this
712+
// if it were a many-to-one relationship, remove the relationship like this
713713
// $tag->setTask(null);
714714

715715
$em->persist($tag);
@@ -730,7 +730,7 @@ the relationship between the removed ``Tag`` and ``Task`` object.
730730
}
731731

732732
As you can see, adding and removing the elements correctly can be tricky.
733-
Unless you have a ManyToMany relationship where Task is the "owning" side,
733+
Unless you have a many-to-many relationship where Task is the "owning" side,
734734
you'll need to do extra work to make sure that the relationship is properly
735735
updated (whether you're adding new tags or removing existing tags) on
736736
each Tag object itself.

cookbook/symfony1.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ places.
6363
In Symfony2, life is much simpler because *all* Symfony2 code must live in
6464
a bundle. In the pretend symfony1 project, all the code *could* be moved
6565
into one or more plugins (which is a very good practice, in fact). Assuming
66-
that all modules, PHP classes, schema, routing configuration, etc were moved
66+
that all modules, PHP classes, schema, routing configuration, etc. were moved
6767
into a plugin, the symfony1 ``plugins/`` directory would be very similar
6868
to the Symfony2 ``src/`` directory.
6969

@@ -176,8 +176,8 @@ from specific directories without defining a dependency:
176176
177177
This means that if a class is not found in the ``vendor`` directory, Composer
178178
will search in the ``src`` directory before throwing a "class does not exist"
179-
exception. Read more about configuring the Composer Autoloader in
180-
`the Composer documentation`_
179+
exception. Read more about configuring the Composer autoloader in
180+
`the Composer documentation`_.
181181

182182
Using the Console
183183
-----------------

cookbook/testing/database.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ your test always has the same data to work with.
1818
Mocking the ``Repository`` in a Unit Test
1919
-----------------------------------------
2020

21-
If you want to test code which depends on a doctrine ``Repository`` in isolation,
21+
If you want to test code which depends on a Doctrine repository in isolation,
2222
you need to mock the ``Repository``. Normally you inject the ``EntityManager``
2323
into your class and use it to get the repository. This makes things a little
2424
more difficult as you need to mock both the ``EntityManager`` and your repository
@@ -27,7 +27,7 @@ class.
2727
.. tip::
2828

2929
It is possible (and a good idea) to inject your repository directly by
30-
registering your repository as a :doc:`factory service </components/dependency_injection/factories>`
30+
registering your repository as a :doc:`factory service </components/dependency_injection/factories>`.
3131
This is a little bit more work to setup, but makes testing easier as you
3232
only need to mock the repository.
3333

cookbook/web_services/php_soap_extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ buffering the STDOUT and use ``ob_get_clean()`` to dump the echoed output
118118
into the content of the Response and clear the output buffer. Finally, you're
119119
ready to return the ``Response``.
120120

121-
Below is an example calling the service using `NuSOAP`_ client. This example
121+
Below is an example calling the service using a `NuSOAP`_ client. This example
122122
assumes that the ``indexAction`` in the controller above is accessible via the
123123
route ``/soap``::
124124

0 commit comments

Comments
 (0)