Skip to content

Commit

Permalink
minor #5938 Add proper use of the password type (themccallister)
Browse files Browse the repository at this point in the history
This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes #5938).

Discussion
----------

Add proper use of the password type

The documentation still referenced using the old `type`.

Updated the code to use `PasswordType::class` vice `password`.

Commits
-------

7bd1f22 Add proper use of the password type
  • Loading branch information
xabbuh committed Dec 1, 2015
2 parents 340ec5f + 7bd1f22 commit d0248d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cookbook/doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Next, create the form for the ``User`` entity::
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;

class UserType extends AbstractType
{
Expand All @@ -169,7 +170,7 @@ Next, create the form for the ``User`` entity::
->add('email', EmailType::class)
->add('username', TextType::class)
->add('plainPassword', RepeatedType::class, array(
'type' => 'password',
'type' => PasswordType::class,
'first_options' => array('label' => 'Password'),
'second_options' => array('label' => 'Repeat Password'),
)
Expand Down

0 comments on commit d0248d6

Please sign in to comment.