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 #434

Closed
wladimiravila opened this issue Jun 16, 2023 · 3 comments
Labels
Milestone

Comments

@wladimiravila
Copy link

wladimiravila commented Jun 16, 2023

Bug Report

the property defaultName on symfony 6.1 or mayor is deprecated

Q A
BC Break NO
Version 6.2 and 6.3

Summary

[info] User Deprecated: 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 "Oneup\UploaderBundle\Command\ClearOrphansCommand" class instead.

How to reproduce

@joesenova
Copy link

joesenova commented Aug 2, 2023

Good day all,

I am busy with this at the moment.
Will post a PR here shortly, see example of the change(s) bellow.

Before:

protected static $defaultName = 'oneup:uploader:clear-chunks';

After:

#[AsCommand(
      name: 'oneup:uploader:clear-chunks'
  )]

This will drop support for php <8.0, and will need to be a major version bump due to the fact.

@joesenova
Copy link

Good day all,

I did some work on getting the repo a bit more php8 styled.
Also got rid of some of the deprecation messages.

As mentioned in the PR, we will need to bump this to a new major package version, as this will drop support for php7.

Pull Request: #435

@bytehead bytehead added the bug label Feb 5, 2024
@bytehead bytehead added this to the 5.x milestone Feb 5, 2024
@bytehead
Copy link
Member

bytehead commented Feb 5, 2024

@joesenova your changes are merged in #436 - thank you very much! 🙏

@bytehead bytehead closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants