From aae22c596e1221594bea98847b61bfd3ab3b136e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:29:30 +0000 Subject: [PATCH 1/2] Update symfony/console requirement from ^6.2 to ^7.2 Updates the requirements on [symfony/console](https://github.com/symfony/console) to permit the latest version. - [Release notes](https://github.com/symfony/console/releases) - [Changelog](https://github.com/symfony/console/blob/7.2/CHANGELOG.md) - [Commits](https://github.com/symfony/console/compare/v6.2.0...v7.2.1) --- updated-dependencies: - dependency-name: symfony/console dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 54a55db..a69c41d 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "maglnet/composer-require-checker": "^4.5", "phpunit/phpunit": "^10.1", "roave/infection-static-analysis-plugin": "^1.16", - "symfony/console": "^6.2", + "symfony/console": "^7.2", "symfony/http-client": "^7.0", "vimeo/psalm": "^6.8", "yiisoft/definitions": "^3.3", From 725292dc180a74b097417393d82bc87ece229a45 Mon Sep 17 00:00:00 2001 From: viktorprogger Date: Tue, 25 Feb 2025 15:44:50 +0500 Subject: [PATCH 2/2] Use attributes in symfony commands instead of old "default*" fields --- src/Console/GetUpdatesCommand.php | 5 ++--- src/Console/SetTelegramWebhookCommand.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Console/GetUpdatesCommand.php b/src/Console/GetUpdatesCommand.php index 871f1bf..e0ea8d5 100644 --- a/src/Console/GetUpdatesCommand.php +++ b/src/Console/GetUpdatesCommand.php @@ -11,17 +11,16 @@ use Botasis\Runtime\Update\UpdateFactory; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Throwable; +#[AsCommand(name: 'botasis:telegram:updates', description: 'Get updates from the bot and process them')] final class GetUpdatesCommand extends Command { - protected static $defaultName = 'botasis/telegram/updates'; - protected static $defaultDescription = 'Get updates from the bot and process them'; - public function __construct( private readonly ClientInterface $client, private readonly Application $application, diff --git a/src/Console/SetTelegramWebhookCommand.php b/src/Console/SetTelegramWebhookCommand.php index 4030c4a..946a63e 100644 --- a/src/Console/SetTelegramWebhookCommand.php +++ b/src/Console/SetTelegramWebhookCommand.php @@ -7,6 +7,7 @@ use Botasis\Client\Telegram\Client\ClientInterface; use Botasis\Client\Telegram\Request\TelegramRequest; use InvalidArgumentException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; @@ -17,11 +18,9 @@ use function str_contains; use function str_starts_with; +#[AsCommand(name: 'botasis:telegram:set-webhook', description: 'Set TG webhook address')] final class SetTelegramWebhookCommand extends Command { - protected static $defaultName = 'botasis/telegram/set-webhook'; - protected static $defaultDescription = 'Set TG webhook address'; - public function __construct( private readonly ClientInterface $client, private readonly QuestionHelper $questionHelper,