Skip to content

Fix defaultName deprecation warning on symfony/console 6.1#2107

Merged
MasterOdin merged 5 commits into0.xfrom
symfony-console-deprecation
Oct 3, 2022
Merged

Fix defaultName deprecation warning on symfony/console 6.1#2107
MasterOdin merged 5 commits into0.xfrom
symfony-console-deprecation

Conversation

@MasterOdin
Copy link
Copy Markdown
Member

@MasterOdin MasterOdin commented Oct 2, 2022

Fixes #2104

symfony/console has changed the mechanism in which command names should be declared, switching from using $defaultName static class parameter, to an attribute.

This deprecation was introduced in 6.1, but the AsName attribute has existed since 5.4. From my testing, it looks like this should work fine for users on older symfony versions with newer PHP versions, as the usage here was purely through ReflectionClass::getAttributes.

@MasterOdin MasterOdin marked this pull request as ready for review October 3, 2022 00:10
@MasterOdin MasterOdin changed the title Fix defaultName deprecation warning on symfony/console 6.1 Fix defaultName deprecation warning on newer symfony/console versions Oct 3, 2022
@MasterOdin MasterOdin changed the title Fix defaultName deprecation warning on newer symfony/console versions Fix defaultName deprecation warning on symfony/console 6.1 Oct 3, 2022
@MasterOdin MasterOdin merged commit 6eb0f29 into 0.x Oct 3, 2022
@MasterOdin MasterOdin deleted the symfony-console-deprecation branch October 3, 2022 04:57
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.

Relying on the static property "$defaultName"

1 participant