diff --git a/src/Core/Bridge/Symfony/Bundle/Command/SwaggerCommand.php b/src/Core/Bridge/Symfony/Bundle/Command/SwaggerCommand.php index 9666b5fa5b2..d474a4ff223 100644 --- a/src/Core/Bridge/Symfony/Bundle/Command/SwaggerCommand.php +++ b/src/Core/Bridge/Symfony/Bundle/Command/SwaggerCommand.php @@ -33,8 +33,6 @@ */ final class SwaggerCommand extends Command { - protected static $defaultName = 'api:swagger:export'; - private $normalizer; private $resourceNameCollectionFactory; private $apiTitle; @@ -115,4 +113,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } + + public static function getDefaultName(): string + { + return 'api:swagger:export'; + } } diff --git a/src/JsonSchema/Command/JsonSchemaGenerateCommand.php b/src/JsonSchema/Command/JsonSchemaGenerateCommand.php index d637a06723d..c4a8c54edc4 100644 --- a/src/JsonSchema/Command/JsonSchemaGenerateCommand.php +++ b/src/JsonSchema/Command/JsonSchemaGenerateCommand.php @@ -33,8 +33,6 @@ */ final class JsonSchemaGenerateCommand extends Command { - protected static $defaultName = 'api:json-schema:generate'; - /** * @var SchemaFactoryInterface|LegacySchemaFactoryInterface */ @@ -123,6 +121,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } + + public static function getDefaultName(): string + { + return 'api:json-schema:generate'; + } } class_alias(JsonSchemaGenerateCommand::class, \ApiPlatform\Core\JsonSchema\Command\JsonSchemaGenerateCommand::class); diff --git a/src/Symfony/Bundle/Command/GraphQlExportCommand.php b/src/Symfony/Bundle/Command/GraphQlExportCommand.php index 84db8778593..96012d89768 100644 --- a/src/Symfony/Bundle/Command/GraphQlExportCommand.php +++ b/src/Symfony/Bundle/Command/GraphQlExportCommand.php @@ -29,8 +29,6 @@ */ class GraphQlExportCommand extends Command { - protected static $defaultName = 'api:graphql:export'; - /** @var SchemaBuilderLegacyInterface|SchemaBuilderInterface */ private $schemaBuilder; @@ -79,6 +77,11 @@ protected function execute(InputInterface $input, OutputInterface $output) return 0; } + + public static function getDefaultName(): string + { + return 'api:graphql:export'; + } } class_alias(GraphQlExportCommand::class, \ApiPlatform\Core\Bridge\Symfony\Bundle\Command\GraphQlExportCommand::class); diff --git a/src/Symfony/Bundle/Command/OpenApiCommand.php b/src/Symfony/Bundle/Command/OpenApiCommand.php index de02f179acc..c61d9dc2e55 100644 --- a/src/Symfony/Bundle/Command/OpenApiCommand.php +++ b/src/Symfony/Bundle/Command/OpenApiCommand.php @@ -30,8 +30,6 @@ */ final class OpenApiCommand extends Command { - protected static $defaultName = 'api:openapi:export'; - private $openApiFactory; private $normalizer; @@ -95,6 +93,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } + + public static function getDefaultName(): string + { + return 'api:openapi:export'; + } } class_alias(OpenApiCommand::class, \ApiPlatform\Core\Bridge\Symfony\Bundle\Command\OpenApiCommand::class);