-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Handling requests sent back from filters #3900
Conversation
@MGatner I am bumping into PHPStan issues with this that I'm not real sure how to resolve. Could you take a look? |
There is a comment before those lines
Just revert your changes to this line and this will go away. Currently you changed: - * @var HTTP\Request|HTTP\IncomingRequest|CLIRequest
+ * @var HTTP\Request|HTTP\IncomingRequest|CLIRequest|RequestInterface
*/
protected $request;
These two are in the |
@paulbalandan @MGatner I made the changes suggested and that seemed to cause new errors. Any ideas? |
This is part of the mess of the HTTP layer that I referenced I have been dealing with. I don't think there is a clean fix, but my recommendation is to check if The other SA issues I will have to look at not on mobile, but it is possible that PHPStan version has changed and some errors are now detected or not different than before. |
…g the before filters.
…st before setting it to the request.
…to fall inline with the type needed in the request property.
332bfd1
to
8da7f28
Compare
Expands the fix of #3085
Description
This is a recreation of #3544 to eliminate issues with the rebase messing up that request.
Filters have the ability to alter the request like adding a user object from an auth filter for example. When it does that the request gets altered implicitly by the filter because the filter's request is pointing to the same object as the request property of the Codeigniter object. If the request gets altered, the filters also return the request into the $possibleResponse variable. This change makes the update to the request property more explicit by setting the property with what gets returned from the filters. This ensures that if for some reason the object pointers get messed up, the request used by the controllers is the altered one.
Checklist: