Skip to content

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