roadrunner-server / roadrunner

🤯 High-performance PHP application server, process manager written in Go and powered with plugins
https://docs.roadrunner.dev
MIT License
7.86k stars 409 forks source link

[🐛 BUG]: Session doesn not work with Symfony #1619

Closed speller closed 1 year ago

speller commented 1 year ago

No duplicates 🥲.

What happened?

Sessions in my Symfony are recreated on every request.

Version (rr --version)

2.12.2

How to reproduce the issue?

Not sure how to reproduce it.

Environment: local HTTP Symfony version: 6.2.5 baldinof/roadrunner-bundle: 2.2.4

In the \Baldinof\RoadRunnerBundle\Http\KernelHandler::handle() method, the request contains the session id cookie:

image

But there's no $_COOKIE array

image

So when Symfony tries to start a session in \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage::start(), it tries to get the session id value from $_COOKIE and gets nothing, creating a new session. How to fix this?

I found only this relevant issue #18 but it's quite old and closed.

Relevant log output

No response

rustatian commented 1 year ago

Hey @speller 👋🏻 There are no superglobals in the RR. HTTP plugin supports PSR-7 standard. To get the cookies, you can use getCookieParams on the RR request.

rustatian commented 1 year ago

Converting into a discussion, since this is not a bug.