Skip to content

Commit 0fae83e

Browse files
committed
add deprecation notes to make:user/make:reset-password/make:registration-form
1 parent 69b8b90 commit 0fae83e

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/Maker/MakeRegistrationForm.php

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
4343
use Symfony\Component\HttpFoundation\Request;
4444
use Symfony\Component\HttpFoundation\Response;
45+
use Symfony\Component\HttpKernel\Kernel;
4546
use Symfony\Component\Mailer\MailerInterface;
4647
use Symfony\Component\Mime\Address;
4748
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
@@ -112,6 +113,10 @@ public function configureCommand(Command $command, InputConfiguration $inputConf
112113

113114
public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
114115
{
116+
if (Kernel::VERSION_ID >= 60000) {
117+
$io->warning('make:registration-form is deprecated in favor of "make:scaffold register".');
118+
}
119+
115120
$interactiveSecurityHelper = new InteractiveSecurityHelper();
116121

117122
if (!$this->fileManager->fileExists($path = 'config/packages/security.yaml')) {

src/Maker/MakeResetPassword.php

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
use Symfony\Component\HttpFoundation\RedirectResponse;
4040
use Symfony\Component\HttpFoundation\Request;
4141
use Symfony\Component\HttpFoundation\Response;
42+
use Symfony\Component\HttpKernel\Kernel;
4243
use Symfony\Component\Mailer\MailerInterface;
4344
use Symfony\Component\Mime\Address;
4445
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
@@ -127,6 +128,10 @@ public function configureDependencies(DependencyBuilder $dependencies): void
127128

128129
public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
129130
{
131+
if (Kernel::VERSION_ID >= 60000) {
132+
$io->warning('make:reset-password is deprecated in favor or "make:scaffold reset-password".');
133+
}
134+
130135
$io->title('Let\'s make a password reset feature!');
131136

132137
$interactiveSecurityHelper = new InteractiveSecurityHelper();

src/Maker/MakeUser.php

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use Symfony\Component\Console\Input\InputArgument;
3333
use Symfony\Component\Console\Input\InputInterface;
3434
use Symfony\Component\Console\Input\InputOption;
35+
use Symfony\Component\HttpKernel\Kernel;
3536
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
3637
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
3738
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
@@ -88,6 +89,10 @@ public function configureCommand(Command $command, InputConfiguration $inputConf
8889

8990
public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
9091
{
92+
if (Kernel::VERSION_ID >= 60000) {
93+
$io->warning('make:user is deprecated in favor of "make:scaffold user".');
94+
}
95+
9196
if (null === $input->getArgument('name')) {
9297
$name = $io->ask(
9398
$command->getDefinition()->getArgument('name')->getDescription(),

0 commit comments

Comments
 (0)