Skip to content

Replace deprecated Command::$defaultName #582

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

Merged
merged 1 commit into from
Sep 1, 2022
Merged

Replace deprecated Command::$defaultName #582

merged 1 commit into from
Sep 1, 2022

Conversation

XWB
Copy link
Member

@XWB XWB commented Aug 31, 2022

The use of Command::$defaultName is deprecate since Symfony 6.1: https://github.com/symfony/symfony/blob/6.2/UPGRADE-6.1.md

@dbu
Copy link
Contributor

dbu commented Aug 31, 2022

the upgrade description is to use the AsCommand annotation. should we add that as well (but keep the setName so things still work for symfony < 6.1)? afaik the idea of the whole thing is to allow symfony to show the list of available commands without having to instantiate all the command classes?

@XWB
Copy link
Member Author

XWB commented Aug 31, 2022

Well, lazy loading is just a preference, not a requirement. And #AsCommand only works with PHP 8, but I can add it if you want.

@dbu
Copy link
Contributor

dbu commented Aug 31, 2022

yep, please do so that we do not have a performance degradation for people on PHP 8 & Symfony 6. it will also prepare us to remove the old way when we drop old versions support.

@XWB
Copy link
Member Author

XWB commented Aug 31, 2022

@dbu Done.

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot!

@dbu dbu merged commit 75c64fe into FriendsOfSymfony:master Sep 1, 2022
@XWB XWB deleted the fix-command-deprecations branch September 1, 2022 09:39
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