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