1up-lab/OneupUploaderBundle

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

wladimiravila opened this issue · 3 comments

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

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.

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

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