Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Fixed shouldQueue() check for bound event listeners #30378

Merged
merged 1 commit into from
Oct 22, 2019
Merged

[6.x] Fixed shouldQueue() check for bound event listeners #30378

merged 1 commit into from
Oct 22, 2019

Conversation

MasterRO94
Copy link
Contributor

Problem
We have an Event Listener that implements the ShouldQueue interface.
Laravel provides a perfect way to handle should handler be queued or not with shouldQueue method.

If the listener has shouldQueue method and it returns false handler won't be queued.
But if we bind Listener via Service container and implement shouldQueue in the child class shouldQueue method won't be triggered if parent class doesn't have shouldQueue method.

This PR fixes this issue by creating an instance before method_exists check.

@GrahamCampbell GrahamCampbell changed the title [6.x] fixed shouldQueue() check for bound event listeners [6.x] Fixed shouldQueue() check for bound event listeners Oct 22, 2019
@taylorotwell taylorotwell merged commit fe9ee80 into laravel:6.x Oct 22, 2019
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.

2 participants