Hypervel\PHPStan\Rules\Queue
Classes
A queued job that uses the Batchable trait must respect early batch
cancellation, either by checking $this->batch()?->cancelled() at the start of
handle(), or by registering the SkipIfBatchCancelled middleware from
middleware().
Every job added to a batch must use the Batchable trait.
A queued job dispatched inside a DB::transaction(...) closure must defer its
dispatch until the transaction commits, by chaining ->afterCommit() on the
dispatch, declaring $afterCommit = true, implementing ShouldQueueAfterCommit,
or using a queue connection that does either.
A queued job (one implementing ShouldQueue) that holds an Eloquent model in a
property must use the SerializesModels trait.
A job implementing ShouldBeUnique must not be dispatched through the bulk or
batch entry points: Bus::batch([...]), Bus::bulk([...]), Queue::bulk([...]),
or a batch's add().
Recommend queue attributes over the configuration properties they replace, which remain supported.
Every job implementing ShouldBeUnique must declare how long it stays unique,
with a #[UniqueFor] attribute, a public uniqueFor() method or a public
$uniqueFor property.
A parameterized job implementing ShouldBeUnique must declare uniqueId,
either as a method (public function uniqueId(): string) or a property
(public $uniqueId).