You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rely on $defaultName property which is deprecated in Symfony 6.1:
Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated.
It can be replaced by the Symfony\Component\Console\Attribute\AsCommand PHP 8 attribute, also the command descriptions can be placed in the attribute, e.g.:
<?phpuseSymfony\Component\Console\Attribute\AsCommand;
#[AsCommand(
name: 'app:version:list-providers',
description: 'List all registered version providers',
)]
finalclassListProvidersCommandextendsCommand
{
// To remove:// protected static $defaultName = 'app:version:list-providers';// Also to remove:// $this->setDescription('List all registered version providers');// from configure() method
...
}
I'd happy to prepare a PR but have no idea how to make attributes are not allowed in PHP 7 and I have no idea how to provide a solution compatible with PHP 7.
The text was updated successfully, but these errors were encountered:
No, I haven't, unfortunately and I have no idea how to make it backward compatible. All commands in my projects use attribites but they run on PHP 8.1 so I haven't had to make it BC.
The following commands:
ListProvidersCommand
StatusCommand
VersionBumpCommand
rely on
$defaultName
property which is deprecated in Symfony 6.1:It can be replaced by the
Symfony\Component\Console\Attribute\AsCommand
PHP 8 attribute, also the command descriptions can be placed in the attribute, e.g.:I'd happy to prepare a PR but have no idea how to make attributes are not allowed in PHP 7 and I have no idea how to provide a solution compatible with PHP 7.
The text was updated successfully, but these errors were encountered: