From 7bd1f22d7a9963cfa30814dd0a4dc17de8e5cf0a Mon Sep 17 00:00:00 2001 From: Jason McCallister Date: Mon, 30 Nov 2015 15:47:23 -0800 Subject: [PATCH] Add proper use of the password type The documentation still referenced using the old `type`. Updated the code to use `PasswordType::class` vice `password`. --- cookbook/doctrine/registration_form.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 9e19eb205f5..ebd11b412a1 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -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 { @@ -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'), )