Skip to content

Commit 4aa1446

Browse files
committed
revert listing commit and add sprintf
1 parent 2d97a8a commit 4aa1446

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/Maker/MakeResetPassword.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Bundle\MakerBundle\Generator;
1919
use Symfony\Bundle\MakerBundle\InputConfiguration;
2020
use Symfony\Bundle\MakerBundle\Security\InteractiveSecurityHelper;
21+
use Symfony\Bundle\MakerBundle\Str;
2122
use Symfony\Bundle\MakerBundle\Util\YamlSourceManipulator;
2223
use Symfony\Bundle\MakerBundle\Validator;
2324
use Symfony\Component\Console\Command\Command;
@@ -268,20 +269,18 @@ public function generate(
268269
$generator->writeChanges();
269270

270271
$this->writeSuccessMessage($io);
271-
$this->successMessage($input, $io, $controllerClassNameDetails->getFullName());
272+
$this->successMessage($input, $io, $controllerClassNameDetails->getFullName(), $requestClassNameDetails->getRelativeNameWithoutSuffix());
272273
}
273274

274275
// @TODO WIP
275-
private function successMessage(InputInterface $input, ConsoleStyle $io, string $userClassName)
276+
private function successMessage(InputInterface $input, ConsoleStyle $io, string $userClassName, string $requestClassName)
276277
{
277-
//@TODO sprintf these as needed
278-
$io->text('Next:');
279-
$io->listing([
280-
'Run "php bin/console make:migration" to generate a migration for the new <fg=yellow>"ResetPasswordRequest"</> entity.',
281-
' Review and customize the templates in <fg=yellow>`templates/reset_password`</>.',
282-
'Make sure your <fg=yellow>MAILER_DSN</> env var has the correct settings.'
283-
284-
]);
278+
$newClosing[] = 'Next:';
279+
$newClosing[] = sprintf(' 1) Run <fg=yellow>"php bin/console make:migration"</> to generate a migration for the new <fg=yellow>"%s"</> entity.', Str::asRoutePath($requestClassName));
280+
$newClosing[] = ' 2) Review and customize the templates in <fg=yellow>`templates/reset_password`</>.';
281+
$newClosing[] = ' 2) Make sure your <fg=yellow>MAILER_DSN</> env var has the correct settings.';
282+
283+
$io->text($newClosing);
285284
$io->newLine();
286285
$io->text('Then go to "/reset-password" and enjoy!');
287286

0 commit comments

Comments
 (0)