core icon indicating copy to clipboard operation
core copied to clipboard

fix: deprecated `UpgradeApiResourceCommand::$defaultName`

Open chalasr opened this issue 2 years ago • 2 comments

Q A
Branch? 2.7
Tickets -
License MIT
Doc PR -

Fixes:

  • 1x: 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\UpgradeApiResourceCommand" class instead.

chalasr avatar Aug 09 '22 14:08 chalasr

I think you should use the getDefaultName method, like this PR: https://github.com/api-platform/core/pull/4795

alanpoulain avatar Aug 09 '22 14:08 alanpoulain

As discussed this way is more future-proof and inline with what has been done in other community bundles. Opened #4889 to use it across the board

chalasr avatar Aug 09 '22 15:08 chalasr