fix: Prevent Laravel Queue hooks from stacking up #2899
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A customer reported hitting the hook limit from
laravel.queue.action
hook installs.While their issue disappears when removing these three lines (CallQueueHandler::call being called before the job handler), this is by no means a fix. For legacy, doing
method_exists
on the hooked $class::$method was returningtrue
for them, and we have had confirmation that this method was indeed being called; yet, the hook wasn't invoked.This PR acts as a mitigation by preventing hooks from stacking up by removing them during the post-hook of the surrounding
fire
operation. It doesn't fix the issue.Reviewer checklist