From 49206dc3d3e42292bef607f8b2522566a7b74bcd Mon Sep 17 00:00:00 2001 From: eneko-koraliving Date: Fri, 26 Dec 2025 07:28:17 +0100 Subject: [PATCH] Add AsCommand attribute to replace deprecated getDefaultName() --- src/Symfony/Bundle/Command/GraphQlExportCommand.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/Command/GraphQlExportCommand.php b/src/Symfony/Bundle/Command/GraphQlExportCommand.php index b83cbd3e12b..334917dc1f0 100644 --- a/src/Symfony/Bundle/Command/GraphQlExportCommand.php +++ b/src/Symfony/Bundle/Command/GraphQlExportCommand.php @@ -15,6 +15,7 @@ use ApiPlatform\GraphQl\Type\SchemaBuilderInterface; use GraphQL\Utils\SchemaPrinter; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -26,6 +27,7 @@ * * @author Alan Poulain */ +#[AsCommand(name: 'api:graphql:export')] class GraphQlExportCommand extends Command { public function __construct(private readonly SchemaBuilderInterface $schemaBuilder) @@ -74,9 +76,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int return \defined(Command::class.'::SUCCESS') ? Command::SUCCESS : 0; } - - public static function getDefaultName(): string - { - return 'api:graphql:export'; - } }