Skip to content

Commit 82b21c0

Browse files
committed
fix: command name deprecation
1 parent a59f153 commit 82b21c0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Command/JsonSchemaGenerateCommand.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use ApiPlatform\JsonSchema\Schema;
1717
use ApiPlatform\JsonSchema\SchemaFactoryInterface;
1818
use ApiPlatform\Metadata\HttpOperation;
19+
use Symfony\Component\Console\Attribute\AsCommand;
1920
use Symfony\Component\Console\Command\Command;
2021
use Symfony\Component\Console\Exception\InvalidOptionException;
2122
use Symfony\Component\Console\Input\InputArgument;
@@ -29,6 +30,7 @@
2930
*
3031
* @author Jacques Lefebvre <[email protected]>
3132
*/
33+
#[AsCommand(name: 'api:json-schema:generate')]
3234
final class JsonSchemaGenerateCommand extends Command
3335
{
3436
private array $formats;
@@ -90,9 +92,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9092

9193
return 0;
9294
}
93-
94-
public static function getDefaultName(): string
95-
{
96-
return 'api:json-schema:generate';
97-
}
9895
}

0 commit comments

Comments
 (0)