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