diff --git a/src/Symfony/Bundle/Command/DebugResourceCommand.php b/src/Symfony/Bundle/Command/DebugResourceCommand.php index f4a8ed8ffc..7479de1382 100644 --- a/src/Symfony/Bundle/Command/DebugResourceCommand.php +++ b/src/Symfony/Bundle/Command/DebugResourceCommand.php @@ -24,7 +24,10 @@ use Symfony\Component\VarDumper\Cloner\ClonerInterface; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; -#[AsCommand(name: 'debug:api-resource')] +#[AsCommand( + name: 'debug:api-resource', + description: 'Debug API Platform resources' +)] final class DebugResourceCommand extends Command { /** @@ -41,7 +44,6 @@ public function __construct(private readonly ResourceMetadataCollectionFactoryIn protected function configure(): void { $this - ->setDescription('Debug API Platform resources') ->addArgument('class', InputArgument::REQUIRED, 'The class you want to debug'); } diff --git a/src/Symfony/Bundle/Command/GraphQlExportCommand.php b/src/Symfony/Bundle/Command/GraphQlExportCommand.php index 334917dc1f..a2383ff757 100644 --- a/src/Symfony/Bundle/Command/GraphQlExportCommand.php +++ b/src/Symfony/Bundle/Command/GraphQlExportCommand.php @@ -27,7 +27,10 @@ * * @author Alan Poulain */ -#[AsCommand(name: 'api:graphql:export')] +#[AsCommand( + name: 'api:graphql:export', + description: 'Export the GraphQL schema in Schema Definition Language (SDL)' +)] class GraphQlExportCommand extends Command { public function __construct(private readonly SchemaBuilderInterface $schemaBuilder) @@ -41,7 +44,6 @@ public function __construct(private readonly SchemaBuilderInterface $schemaBuild protected function configure(): void { $this - ->setDescription('Export the GraphQL schema in Schema Definition Language (SDL)') ->addOption('comment-descriptions', null, InputOption::VALUE_NONE, 'Use preceding comments as the description (deprecated: graphql-php < 15)') ->addOption('sort-types', null, InputOption::VALUE_NONE, 'Order types alphabetically') ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Write output to file'); diff --git a/tests/Fixtures/TestBundle/ApiResource/ItemUriTemplateWithCollection/Recipe.php b/tests/Fixtures/TestBundle/ApiResource/ItemUriTemplateWithCollection/Recipe.php index 2830e6ef8e..2fd2981190 100644 --- a/tests/Fixtures/TestBundle/ApiResource/ItemUriTemplateWithCollection/Recipe.php +++ b/tests/Fixtures/TestBundle/ApiResource/ItemUriTemplateWithCollection/Recipe.php @@ -20,14 +20,12 @@ #[Get( uriTemplate: '/item_uri_template_recipes/{id}{._format}', - shortName: 'ItemRecipe', uriVariables: ['id'], provider: [self::class, 'provide'], openapi: false )] #[Get( uriTemplate: '/item_uri_template_recipes_state_option/{id}{._format}', - shortName: 'ItemRecipe', uriVariables: ['id'], openapi: false, stateOptions: new Options(entityClass: EntityRecipe::class)