Skip to content

Commit d0248d6

Browse files
committed
minor symfony#5938 Add proper use of the password type (themccallister)
This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes symfony#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
2 parents 340ec5f + 7bd1f22 commit d0248d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: 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)