Skip to content

Commit

Permalink
Fix deprecations on Symfony 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr committed Apr 17, 2022
1 parent b7a640b commit a44912a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Command/CheckConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
namespace Lexik\Bundle\JWTAuthenticationBundle\Command;

use Lexik\Bundle\JWTAuthenticationBundle\Services\KeyLoader\KeyLoaderInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
* CheckConfigCommand.
*
* @author Nicolas Cabot <n.cabot@lexik.fr>
*
* @final
*/
#[AsCommand(name: 'lexik:jwt:check-config', description: 'Checks that the bundle is properly configured.')]
class CheckConfigCommand extends Command
{
/**
* @deprecated
*/
protected static $defaultName = 'lexik:jwt:check-config';

private $keyLoader;
Expand Down
5 changes: 5 additions & 0 deletions Command/GenerateKeyPairCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Lexik\Bundle\JWTAuthenticationBundle\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -13,6 +14,7 @@
/**
* @author Beno!t POLASZEK <bpolaszek@gmail.com>
*/
#[AsCommand(name: 'lexik:jwt:generate-keypair', description: 'Generate public/private keys for use in your application.')]
final class GenerateKeyPairCommand extends Command
{
private const ACCEPTED_ALGORITHMS = [
Expand All @@ -27,6 +29,9 @@ final class GenerateKeyPairCommand extends Command
'ES512',
];

/**
* @deprecated
*/
protected static $defaultName = 'lexik:jwt:generate-keypair';

/**
Expand Down
5 changes: 5 additions & 0 deletions Command/GenerateTokenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Lexik\Bundle\JWTAuthenticationBundle\Command;

use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -15,8 +16,12 @@
*
* @author Samuel Roze <samuel.roze@gmail.com>
*/
#[AsCommand(name: 'lexik:jwt:generate-token', description: 'Generates a JWT token for a given user.')]
class GenerateTokenCommand extends Command
{
/**
* @deprecated
*/
protected static $defaultName = 'lexik:jwt:generate-token';

private $tokenManager;
Expand Down

0 comments on commit a44912a

Please sign in to comment.