-
Notifications
You must be signed in to change notification settings - Fork 99
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
Request/Response objects in example action are incorrectly type hinted #34
Comments
It's intentional in the sense that I wanted to point out that the Request and Response could be any implementation of PSR-7, such as Diactoros'. You're right though, that in practice they are going to be Slim's implementation in the action. |
I thought that might be the case. Personally, I find that I use the additional methods (now that I know that they're there and not just the PSR-7 ones) so I always change my declarations. Spoke to a few people at PHP MiNDS the other week who didn't realise that those methods were available because their IDE wasn't suggesting them. I'm a little confused how methods like |
That's a really valid point! (& yeah, there's a number of methods that I wish was in the actual spec!) |
Someone will disagree :) Thanks |
Rob,
I'm not sure if it's deliberate or not, but I noticed that the example action suggests that the
Request
andResponse
objects are PSR-7, but they're actuallySlim\Http\Request
andSlim\Http\Response
respectively.slim3-skeleton/app/src/Action/HomeAction.php
Line 6 in da0be21
should be
The documentation states:
So it's not technically a PSR-7 implementation. I'll submit a PR in case this isn't deliberate :)
The text was updated successfully, but these errors were encountered: