Skip to content

Commit

Permalink
add deprecation notes to make:user/make:reset-password/make:registrat…
Browse files Browse the repository at this point in the history
…ion-form
  • Loading branch information
kbond committed May 2, 2022
1 parent f1e9503 commit 11e61c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Maker/MakeRegistrationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Address;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
Expand Down Expand Up @@ -112,6 +113,10 @@ public function configureCommand(Command $command, InputConfiguration $inputConf

public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
{
if (Kernel::VERSION_ID >= 60000) {
$io->warning('make:registration-form is deprecated in favor of "make:scaffold register".');
}

$interactiveSecurityHelper = new InteractiveSecurityHelper();

if (!$this->fileManager->fileExists($path = 'config/packages/security.yaml')) {
Expand Down
5 changes: 5 additions & 0 deletions src/Maker/MakeResetPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Address;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
Expand Down Expand Up @@ -127,6 +128,10 @@ public function configureDependencies(DependencyBuilder $dependencies): void

public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
{
if (Kernel::VERSION_ID >= 60000) {
$io->warning('make:reset-password is deprecated in favor or "make:scaffold reset-password".');
}

$io->title('Let\'s make a password reset feature!');

$interactiveSecurityHelper = new InteractiveSecurityHelper();
Expand Down
5 changes: 5 additions & 0 deletions src/Maker/MakeUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher;
use Symfony\Component\Security\Core\Encoder\Argon2iPasswordEncoder;
use Symfony\Component\Security\Core\Encoder\NativePasswordEncoder;
Expand Down Expand Up @@ -91,6 +92,10 @@ public function configureCommand(Command $command, InputConfiguration $inputConf

public function interact(InputInterface $input, ConsoleStyle $io, Command $command)
{
if (Kernel::VERSION_ID >= 60000) {
$io->warning('make:user is deprecated in favor of "make:scaffold user".');
}

if (null === $input->getArgument('name')) {
$name = $io->ask(
$command->getDefinition()->getArgument('name')->getDescription(),
Expand Down

0 comments on commit 11e61c6

Please sign in to comment.