Skip to content

Conversation

@skylerkatz
Copy link
Contributor

@skylerkatz skylerkatz commented Oct 30, 2025

Within handleRequest() $request->getCookies() returns an array of Amp\Cookie\RequestCookie objects. Before this PR those were being passed directly to the Laravel Request class, even though that expects an array of string key-value pairs.

So we first map over the amp cookie objects and get them into the format Laravel expects. We have to call urldecode because the browser engines give amp encoded strings, but the laravel request expects decoded strings.

After that, we merge in any cookies set within the test cases.

The server variables is a little more straightforward. We create a method on the Browsable trait that gives us access to the protected $serverVariables property on the TestCase/MakesHttpRequests.

@inxilpro inxilpro merged commit 2164fdf into pestphp:4.x Nov 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants