[5.6] Use input method to allow compatibility with Lumen and PusherBroadcaster #24622
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.
When using Lumen, the route resolver as called in
\Illuminate\Http\Request::route
will generally return an array and not a\Illuminate\Routing\Route
object. This presents a problem whenever the__get
magic method on theRequest
object is called.In
\Illuminate\Broadcasting\Broadcasters\PusherBroadcaster::decodePusherResponse
, the first conditional uses that magic method to check if a callback is present. This change was introduced in #24018 and is the root cause of this issue.To resolve this issue, we should use the
input
method to check for a callback rather than the current style. The change introduced here does just that and will fix laravel/lumen-framework#763.