Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. #1329

Open
o5 opened this issue Mar 8, 2023 · 6 comments

Comments

@o5
Copy link

o5 commented Mar 8, 2023

Feature Request

Q A
New Feature no
RFC no
BC Break no

Summary

Do not use deprecated $defaultName.

* 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 "Doctrine\Migrations\Tools\Console\Command\CurrentCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\DiffCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\DumpSchemaCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\ExecuteCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\GenerateCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\LatestCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\ListCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\MigrateCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\RollupCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\StatusCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\SyncMetadataCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\UpToDateCommand" class instead.

* 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 "Doctrine\Migrations\Tools\Console\Command\VersionCommand" class instead.
@greg0ire
Copy link
Member

greg0ire commented Mar 8, 2023

BC Break: yes

How is this a breaking change? And what is? We didn't change anything, Symfony did. Anyway, if you're volunteering to fix this, please go ahead 👍

@o5
Copy link
Author

o5 commented Mar 8, 2023

How is this a breaking change? And what is?

How would you mark this? As New Feature?

We didn't change anything, Symfony did.

I know, I just upgraded PHPUnit from 9.5.28 to 10.0.14 in my project where I use doctrine/migrations and deprecation notice began to show.

@greg0ire
Copy link
Member

greg0ire commented Mar 8, 2023

How would you mark this? As New Feature?

It's OK to respond "no" to all 3 questions.

@o5
Copy link
Author

o5 commented Mar 9, 2023

Changed answers as you wanted. You are member and smarter but I still think it will be BC Break because the current requirements "symfony/console": "^4.4.16 || ^5.4 || ^6.0" have to be changed for address this issue.

@eugene-borovov
Copy link

@derrabus
Copy link
Member

derrabus commented Mar 9, 2023

@eugene-borovov No, the right upgrade path would be to add the AsCommand attribute.

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

No branches or pull requests

4 participants