HelpPropertyToHelpAttributeRector

Changes the help property to use the Help attribute

 use Illuminate\Console\Command;
+use Illuminate\Console\Attributes\Help;

+#[Help('This command sends emails to all users')]
 class SendEmails extends Command
 {
-    protected $help = 'This command sends emails to all users';
 }

Configure your rector.php:

<?php

use RectorLaravel\Rector\Class_\HelpPropertyToHelpAttributeRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        HelpPropertyToHelpAttributeRector::class,
    ]);