Changes the description property to use the Description attribute
use Illuminate\Console\Command;
+use Illuminate\Console\Attributes\Description;
+#[Description('Send marketing emails to users')]
class SendEmails extends Command
{
- protected $description = 'Send marketing emails to users';
}
Configure your rector.php:
<?php
use RectorLaravel\Rector\Class_\DescriptionPropertyToDescriptionAttributeRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
DescriptionPropertyToDescriptionAttributeRector::class,
]);