From 619cc45359ead519b64129181a07e14160fbbfcb Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 22 Dec 2015 10:16:34 +0100 Subject: Symfony Upgrade Fixer FTW symfony-upgrade-fixer fix src/Wallabag/ --- src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php') diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 82e1954d..615b8169 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php @@ -3,6 +3,9 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\PasswordType; +use Symfony\Component\Form\Extension\Core\Type\RepeatedType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; use Symfony\Component\Validator\Constraints; @@ -12,10 +15,10 @@ class ChangePasswordType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('old_password', 'password', array( + ->add('old_password', PasswordType::class, array( 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), )) - ->add('new_password', 'repeated', array( + ->add('new_password', RepeatedType::class, array( 'type' => 'password', 'invalid_message' => 'The password fields must match.', 'required' => true, @@ -29,11 +32,11 @@ class ChangePasswordType extends AbstractType new Constraints\NotBlank(), ), )) - ->add('save', 'submit') + ->add('save', SubmitType::class) ; } - public function getName() + public function getBlockPrefix() { return 'change_passwd'; } -- cgit v1.2.3 From 5c895a7fd15822856fb407910264c5d95e1e223c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 22 Dec 2015 13:00:37 +0100 Subject: Update bundle & stock file - update stock file (AppKernel, app.php, etc ..) from SymfonyStandard edition) - update bundle to latest release - remove security on profiler --- src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php') diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 615b8169..7d05a5d8 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php @@ -19,7 +19,7 @@ class ChangePasswordType extends AbstractType 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), )) ->add('new_password', RepeatedType::class, array( - 'type' => 'password', + 'type' => PasswordType::class, 'invalid_message' => 'The password fields must match.', 'required' => true, 'first_options' => array('label' => 'New password'), -- cgit v1.2.3