DeleteWhenMissingModelsPropertyToDeleteWhenMissingModelsAttributeRector

Changes the deleteWhenMissingModels property to use the DeleteWhenMissingModels attribute

 use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Queue\Attributes\DeleteWhenMissingModels;

+#[DeleteWhenMissingModels]
 final class ProcessPodcast implements ShouldQueue
 {
-    public $deleteWhenMissingModels = true;
 }

Configure your rector.php:

<?php

use RectorLaravel\Rector\Class_\DeleteWhenMissingModelsPropertyToDeleteWhenMissingModelsAttributeRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        DeleteWhenMissingModelsPropertyToDeleteWhenMissingModelsAttributeRector::class,
    ]);