SignaturePropertyToSignatureAttributeRector

Changes the signature property to use the Signature attribute

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

+#[Signature('mail:send {user}')]
 class SendEmails extends Command
 {
-    protected $signature = 'mail:send {user}';
 }

Configure your rector.php:

<?php

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

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