Skip to content

use AsCommand to  #4783

Description

@tacman

Description

As of Symfony 6.1, Symfony\Component\Console\Attribute\AsCommand attribute is required.

Example

bin/console api


2022-06-01T07:36:06-04:00 [info] User Deprecated: Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "ApiPlatform\Core\JsonSchema\Command\JsonSchemaGenerateCommand" class instead.
2022-06-01T07:36:06-04:00 [info] User Deprecated: Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "ApiPlatform\Core\Bridge\Symfony\Bundle\Command\OpenApiCommand" class instead.
2022-06-01T07:36:06-04:00 [info] User Deprecated: Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "ApiPlatform\Core\Bridge\Symfony\Bundle\Command\SwaggerCommand" class instead.

The fix is pretty simple, and I'm happy to do it, but am wondering which branch to put it in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions