Skip to content

Commit

Permalink
feature #1523 [make:auth] deprecated command
Browse files Browse the repository at this point in the history
- use any of the `make:security:*` commands instead
  • Loading branch information
jrushlow authored Apr 27, 2024
1 parent 03592b9 commit 03b5a9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Maker/MakeAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
use Symfony\Component\Security\Http\Util\TargetPathTrait;
use Symfony\Component\Yaml\Yaml;

trigger_deprecation('symfony/maker-bundle', 'v1.59.0', 'The "%s" class is deprecated, use any of the Security\Make* commands instead.', MakeAuthenticator::class);

/**
* @deprecated since MakerBundle v1.59.0, use any of the Security/Make* instead.
*
* @author Ryan Weaver <ryan@symfonycasts.com>
* @author Jesse Rushlow <jr@rushlow.dev>
*
Expand Down Expand Up @@ -95,6 +99,8 @@ public function configureCommand(Command $command, InputConfiguration $inputConf

public function interact(InputInterface $input, ConsoleStyle $io, Command $command): void
{
$io->caution('"make:auth" is deprecated, use any of the "make:security" commands instead.');

if (!$this->fileManager->fileExists($path = 'config/packages/security.yaml')) {
throw new RuntimeCommandException('The file "config/packages/security.yaml" does not exist. PHP & XML configuration formats are currently not supported.');
}
Expand Down
3 changes: 3 additions & 0 deletions tests/Maker/MakeAuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Bundle\MakerBundle\Test\MakerTestRunner;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;

/**
* @group legacy
*/
class MakeAuthenticatorTest extends MakerTestCase
{
protected function getMakerClass(): string
Expand Down

0 comments on commit 03b5a9f

Please sign in to comment.