|
18 | 18 | use Symfony\Bundle\MakerBundle\Generator;
|
19 | 19 | use Symfony\Bundle\MakerBundle\InputConfiguration;
|
20 | 20 | use Symfony\Bundle\MakerBundle\Security\InteractiveSecurityHelper;
|
| 21 | +use Symfony\Bundle\MakerBundle\Str; |
21 | 22 | use Symfony\Bundle\MakerBundle\Util\YamlSourceManipulator;
|
22 | 23 | use Symfony\Bundle\MakerBundle\Validator;
|
23 | 24 | use Symfony\Component\Console\Command\Command;
|
@@ -268,20 +269,18 @@ public function generate(
|
268 | 269 | $generator->writeChanges();
|
269 | 270 |
|
270 | 271 | $this->writeSuccessMessage($io);
|
271 |
| - $this->successMessage($input, $io, $controllerClassNameDetails->getFullName()); |
| 272 | + $this->successMessage($input, $io, $controllerClassNameDetails->getFullName(), $requestClassNameDetails->getRelativeNameWithoutSuffix()); |
272 | 273 | }
|
273 | 274 |
|
274 | 275 | // @TODO WIP
|
275 |
| - private function successMessage(InputInterface $input, ConsoleStyle $io, string $userClassName) |
| 276 | + private function successMessage(InputInterface $input, ConsoleStyle $io, string $userClassName, string $requestClassName) |
276 | 277 | {
|
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); |
285 | 284 | $io->newLine();
|
286 | 285 | $io->text('Then go to "/reset-password" and enjoy!');
|
287 | 286 |
|
|
0 commit comments