Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add missing setResponse() setter for FilterUserResponseEvent #2606
Add the missing setter setResponse for Response object in FilterUserResponseEvent class.
I am using the setResponse() method in FilterUserResponseEvent in a listener after capture the event FOSUserEvents::RESETTING_RESET_COMPLETED creating a callback that sent to the admin an email notifing which user has changed his password (with option of know the new password or not). After all this, I redirect the response to a custom url, which is where I use the setResponse() method.
Without the method I have to fetch the Response object and set the target url:
$response = $event->getResponse(); $response->setTargetUrl($url);
If I have this PR accepted, then I could write:
$response = $event->setResponse(new RedirectResponse($url));