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 1 commit into from Oct 22, 2019


Copy link

MasterRO94 commented Oct 22, 2019

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
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.