Closed 0x6d6c closed 2 years ago
Have you already tried adding the attribute and keeping the property for backward compatibility?
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.