Skip to content

fix(worker): incorrect session state#2193

Draft
xavierleune wants to merge 1 commit intophp:mainfrom
alketech:fix/session
Draft

fix(worker): incorrect session state#2193
xavierleune wants to merge 1 commit intophp:mainfrom
alketech:fix/session

Conversation

@xavierleune
Copy link
Contributor

  • Conditionaly include ext/session/php_session
  • Simpler session management without handler snapshot

@dunglas
Copy link
Member

dunglas commented Feb 16, 2026

What's the difference with #2192? #2192 looks simpler.

@xavierleune
Copy link
Contributor Author

What's the difference with #2192? #2192 looks simpler.

I remove session from MODULES_TO_RELOAD but destroy session data, leaving handlers untouched to keep the bugfix from #2139

@AlliBalliBaba
Copy link
Contributor

Looks a bit cleaner than the previous solution, you'll also have to add BC for PHP 8.2 https://github.com/php/frankenphp/actions/runs/22057186532/job/63728080602?pr=2193

Would also probably be nice to add tests that somewhat reproduce #2190 and #2185, since with this solution we'd have to keep up with changes in the session extension.

@xavierleune
Copy link
Contributor Author

Thanks for the feedback. I'll try to have a small reproducer but was unable to so far. For the future I think we may propose a small change in php to expose a clean api to remove the need to follow upcoming changes. A small function with the subset reproduced here would do the trick.

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please rebase to see if tests are green @xavierleune?

It would be nice if you could check the "allow maintainers to push code" checkbox so we could do that directly, btw :)

Thanks for your contribs!!

@xavierleune
Copy link
Contributor Author

@dunglas i'll mark this one as draft for now. I've investigated more on #2185 and it seems to be unrelated to changes around session, but more to the ini reset. You can see this comment with more details.
I'll open a PR with a small reproducer for the bug, but I think we might need your input about the best way to fix it.

When the root cause with ini is fixed I'll continue on this PR

@xavierleune xavierleune marked this pull request as draft February 18, 2026 19:42
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.

3 participants

Comments