Changes the queue property to use the Queue attribute
use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Queue\Attributes\Queue;
+#[Queue('podcasts')]
final class ProcessPodcast implements ShouldQueue
{
- public $queue = 'podcasts';
}
Configure your rector.php:
<?php
use RectorLaravel\Rector\Class_\QueuePropertyToQueueAttributeRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
QueuePropertyToQueueAttributeRector::class,
]);