Replace Dispatchable, InteractsWithQueue, Queueable, and SerializesModels traits with the Queueable trait
use Illuminate\Bus\Queueable;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class SomeJob
{
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+ use \Illuminate\Foundation\Queue\Queueable;
}
Configure your rector.php:
<?php
use RectorLaravel\Rector\Class_\ReplaceQueueTraitsWithQueueableRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
ReplaceQueueTraitsWithQueueableRector::class,
]);