Skip to content

Commit 415d9ee

Browse files
committed
minor refactoring of maker and templates
1 parent 481c7a3 commit 415d9ee

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/Maker/MakeResetPassword.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public function configureDependencies(DependencyBuilder $dependencies)
6464

6565
public function interact(InputInterface $input, ConsoleStyle $io, Command $command)
6666
{
67+
$io->title('Let\'s make a password reset feature!');
68+
6769
// initialize arguments & commands that are internal (i.e. meant only to be asked)
6870
$command
6971
->addArgument('from-email-address', InputArgument::REQUIRED)
@@ -90,7 +92,7 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
9092
$userClass = $interactiveSecurityHelper->guessUserClass(
9193
$io,
9294
$providersData,
93-
'Enter the User class that should be used with the "forgotten password" feature (e.g. <fg=yellow>App\\Entity\\User</>)'
95+
'What is the User entity that should be used with the "forgotten password" feature? (e.g. <fg=yellow>App\\Entity\\User</>)'
9496
)
9597
);
9698

@@ -271,5 +273,6 @@ private function successMessage(InputInterface $input, ConsoleStyle $io, string
271273
$io->text($closing);
272274
$io->newLine();
273275
$io->text('Then open your browser, go to "/reset-password" and enjoy!');
276+
$io->newLine();
274277
}
275278
}

src/Resources/skeleton/resetPassword/ResetPasswordController.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function reset(Request $request, UserPasswordEncoderInterface $passwordEn
8888

8989
$token = $this->getTokenFromSession();
9090
if (null === $token) {
91-
throw $this->createNotFoundException();
91+
throw $this->createNotFoundException('No reset password token found in the URL or in the session.');
9292
}
9393

9494
try {

src/Resources/skeleton/resetPassword/twig_request.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<h1>Reset your password</h1>
1010

1111
{{ form_start(requestForm) }}
12-
{{ form_row(requestForm.<?= $email_field ?>) }}
12+
{{ form_row(requestForm.<?= $email_field ?>) }}
1313
<div>
1414
<small>
1515
Enter your email address and we we will send you a

src/Resources/skeleton/resetPassword/twig_reset.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h1>Reset your password</h1>
77
88
{{ form_start(resetForm) }}
9-
{{ form_row(resetForm.plainPassword) }}
9+
{{ form_row(resetForm.plainPassword) }}
1010
<button class="btn btn-primary">Reset password</button>
1111
{{ form_end(resetForm) }}
1212
{% endblock %}

0 commit comments

Comments
 (0)