Skip to content

fix: deprecated UpgradeApiResourceCommand::$defaultName#4888

Merged
alanpoulain merged 1 commit into
api-platform:2.7from
chalasr:fix-defaultname
Aug 11, 2022
Merged

fix: deprecated UpgradeApiResourceCommand::$defaultName#4888
alanpoulain merged 1 commit into
api-platform:2.7from
chalasr:fix-defaultname

Conversation

@chalasr

@chalasr chalasr commented Aug 9, 2022

Copy link
Copy Markdown
Contributor
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.

@alanpoulain

Copy link
Copy Markdown
Member

I think you should use the getDefaultName method, like this PR: #4795

@chalasr

chalasr commented Aug 9, 2022

Copy link
Copy Markdown
Contributor Author

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

@alanpoulain alanpoulain merged commit 7ecb56f into api-platform:2.7 Aug 11, 2022
@chalasr chalasr deleted the fix-defaultname branch August 11, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants