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