Skip to content

[13.x] Add Batch::failureCallbacks for callback inspection#60534

Open
miladev95 wants to merge 1 commit into
laravel:13.xfrom
miladev95:bus-batch-failure-callbacks
Open

[13.x] Add Batch::failureCallbacks for callback inspection#60534
miladev95 wants to merge 1 commit into
laravel:13.xfrom
miladev95:bus-batch-failure-callbacks

Conversation

@miladev95

Copy link
Copy Markdown
Contributor

Batch now exposes failureCallbacks() so stored batches can be inspected in the same way as PendingBatch.

PendingBatch already has failureCallbacks(), but Illuminate\Bus\Batch only exposed the boolean callback checks.
This change fills that gap and keeps the pending and persisted batch APIs aligned.

The new method returns the registered failure callbacks from the batch options, or an empty array when none are present. I also added coverage in the Bus batch state tests for both hasFailureCallbacks() and failureCallbacks().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant