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'; - } }