Changes the hidden property to use the Hidden attribute on console commands
use Illuminate\Console\Command;
+use Illuminate\Console\Attributes\Hidden;
+#[Hidden]
class SendEmails extends Command
{
- protected $hidden = true;
}
Configure your rector.php:
<?php
use RectorLaravel\Rector\Class_\CommandHiddenPropertyToHiddenAttributeRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
CommandHiddenPropertyToHiddenAttributeRector::class,
]);