Closed Antnee closed 8 years ago
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 getParam()
isn't in PSR-7 to be honest
That's a really valid point!
(& yeah, there's a number of methods that I wish was in the actual spec!)
That's a really valid point!
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.https://github.com/akrabat/slim3-skeleton/blob/da0be2131cc895f51dfba30a349bac4034229a39/app/src/Action/HomeAction.php#L6
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 :)