Skip to content

Commit 7bd1f22

Browse files
jasonmccallisterxabbuh
authored andcommitted
Add proper use of the password type
The documentation still referenced using the old `type`. Updated the code to use `PasswordType::class` vice `password`.
1 parent 340ec5f commit 7bd1f22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cookbook/doctrine/registration_form.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Next, create the form for the ``User`` entity::
160160
use Symfony\Component\Form\Extension\Core\Type\EmailType;
161161
use Symfony\Component\Form\Extension\Core\Type\TextType;
162162
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
163+
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
163164

164165
class UserType extends AbstractType
165166
{
@@ -169,7 +170,7 @@ Next, create the form for the ``User`` entity::
169170
->add('email', EmailType::class)
170171
->add('username', TextType::class)
171172
->add('plainPassword', RepeatedType::class, array(
172-
'type' => 'password',
173+
'type' => PasswordType::class,
173174
'first_options' => array('label' => 'Password'),
174175
'second_options' => array('label' => 'Repeat Password'),
175176
)

0 commit comments

Comments
 (0)