From 25dae35a7baa8a77a57cd90c04e15813f9485b5e Mon Sep 17 00:00:00 2001 From: yivi Date: Tue, 19 Dec 2023 09:40:23 +0100 Subject: [PATCH] fix Console deprecation --- src/Console/PurgeExpiredTokensCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Console/PurgeExpiredTokensCommand.php b/src/Console/PurgeExpiredTokensCommand.php index e5b831a..cf73320 100644 --- a/src/Console/PurgeExpiredTokensCommand.php +++ b/src/Console/PurgeExpiredTokensCommand.php @@ -4,6 +4,7 @@ namespace Yivoff\JwtRefreshBundle\Console; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -11,13 +12,13 @@ use Yivoff\JwtRefreshBundle\Contracts\PurgableRefreshTokenProviderInterface; use Yivoff\JwtRefreshBundle\Contracts\RefreshTokenProviderInterface; + +#[AsCommand('yivoff:jwt_refresh:purge_expired_tokens')] class PurgeExpiredTokensCommand extends Command { - protected static $defaultName = 'yivoff:jwt_refresh:purge_expired_tokens'; - - public function __construct(private RefreshTokenProviderInterface $provider) + public function __construct(private readonly RefreshTokenProviderInterface $provider) { - parent::__construct((string) self::$defaultName); + parent::__construct(); } protected function configure(): void