Skip to content

Commit 134d90e

Browse files
committed
minor #6255 [Cookbook][Doctrine] some tweaks to the Doctrine registration article (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Cookbook][Doctrine] some tweaks to the Doctrine registration article Commits ------- 999e783 some tweaks to the Doctrine registration article
2 parents 0a59c2d + 999e783 commit 134d90e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

cookbook/doctrine/registration_form.rst

+12-11
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Your ``User`` entity will probably at least have the following fields:
3535
``plainPassword``
3636
This field is *not* persisted: (notice no ``@ORM\Column`` above it). It
3737
temporarily stores the plain password from the registration form. This field
38-
can be validated then used to populate the ``password`` field.
38+
can be validated and is then used to populate the ``password`` field.
3939

4040
With some validation added, your class may look something like this::
4141

@@ -127,17 +127,18 @@ With some validation added, your class may look something like this::
127127

128128
public function getSalt()
129129
{
130-
// The bcrypt algorithm don't require a separate salt.
130+
// The bcrypt algorithm doesn't require a separate salt.
131131
// You *may* need a real salt if you choose a different encoder.
132132
return null;
133133
}
134134

135135
// other methods, including security methods like getRoles()
136136
}
137137

138-
The ``UserInterface`` requires a few other methods and your ``security.yml`` file
139-
needs to be configured properly to work with the ``User`` entity. For a more full
140-
example, see the :ref:`Entity Provider <security-crete-user-entity>` article.
138+
The :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` requires
139+
a few other methods and your ``security.yml`` file needs to be configured
140+
properly to work with the ``User`` entity. For a more complete example, see
141+
the :ref:`Entity Provider <security-crete-user-entity>` article.
141142

142143
.. _cookbook-registration-password-max:
143144

@@ -186,7 +187,7 @@ Next, create the form for the ``User`` entity::
186187
public function setDefaultOptions(OptionsResolverInterface $resolver)
187188
{
188189
$resolver->setDefaults(array(
189-
'data_class' => 'AppBundle\Entity\User'
190+
'data_class' => 'AppBundle\Entity\User',
190191
));
191192
}
192193

@@ -201,7 +202,8 @@ There are just three fields: ``email``, ``username`` and ``plainPassword``
201202

202203
.. tip::
203204

204-
To explore more things about the Form component, read :doc:`/book/forms`.
205+
To explore more things about the Form component, read the
206+
:doc:`chapter about forms </book/forms>` in the book.
205207

206208
Handling the Form Submission
207209
----------------------------
@@ -213,10 +215,9 @@ into the database::
213215
// src/AppBundle/Controller/RegistrationController.php
214216
namespace AppBundle\Controller;
215217

216-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
217-
218218
use AppBundle\Form\UserType;
219219
use AppBundle\Entity\User;
220+
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
220221
use Symfony\Component\HttpFoundation\Request;
221222
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
222223

@@ -376,8 +377,8 @@ See :doc:`/cookbook/form/form_customization` for more details.
376377
Update your Database Schema
377378
---------------------------
378379

379-
If you've updated the User entity during this tutorial, you have to update your
380-
database schema using this command:
380+
If you've updated the ``User`` entity during this tutorial, you have to update
381+
your database schema using this command:
381382

382383
.. code-block:: bash
383384

0 commit comments

Comments
 (0)