You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The beforeSending method on the PendingRequest class says that it takes a callable $callback, however, this is not entirely true. When the callback is called, it is done so using $callback->__invoke(...) and not $callback(...). This makes the following syntax result in error "Call to a member function __invoke() on array":
I expect the code above to execute the prepareRequest method as the callable with the params passed. This happens if the callback would be called using $callback(...).
Steps To Reproduce:
Create a PendingRequest using Http fascade.
Set beforeSending to a callable referencing method on object using array syntax as demonstrated in description example,
Send request.
See error.
The text was updated successfully, but these errors were encountered:
Description:
The
beforeSending
method on thePendingRequest
class says that it takes acallable $callback
, however, this is not entirely true. When the callback is called, it is done so using$callback->__invoke(...)
and not$callback(...)
. This makes the following syntax result in error "Call to a member function __invoke() on array
":I expect the code above to execute the
prepareRequest
method as the callable with the params passed. This happens if the callback would be called using$callback(...)
.Steps To Reproduce:
beforeSending
to a callable referencing method on object using array syntax as demonstrated in description example,The text was updated successfully, but these errors were encountered: