request-parser icon indicating copy to clipboard operation
request-parser copied to clipboard

Add $_COOKIE support

Open apeiniger opened this issue 7 years ago • 6 comments

It would be great if this library could also support accessing the $_COOKIE variable. For me it would make sense as the cookies basically belong to the request. Had a use case recently where I needed it and wanted to do the same checks and defaults setting.

apeiniger avatar Jun 16 '17 14:06 apeiniger

@apeiniger @mpscholten this is actually something worthwhile checking, I'll assemble a short outline of the idea I had in mind, would love to hear your pros and cons.

yuvalherziger avatar Oct 12 '17 08:10 yuvalherziger

👍

mpscholten avatar Oct 12 '17 09:10 mpscholten

#50 (WIP) can be used to experiment with cookies, I think functional tests would be called for in this case 🙂

yuvalherziger avatar Oct 16 '17 06:10 yuvalherziger

@apeiniger, just a heads up for the corresponding pull request (see above), the parsing is actually done on the request cookies rather than reading the $_COOKIE global in a type-safe manner, simply because it's how you'd keep the cookies requested-based.

yuvalherziger avatar Oct 17 '17 07:10 yuvalherziger

Cool, so you're taking it from the Symfony Request, right?

apeiniger avatar Oct 17 '17 15:10 apeiniger

Sorry for the holdup, I'll have some time to pick it up from where we left it in the coming days 🙂

yuvalherziger avatar Feb 20 '18 22:02 yuvalherziger