Conversation
There was a problem hiding this comment.
Pull request overview
This pull request reverts the INI snapshot/restore mechanism from PR #2139 that caused issues with frameworks like Symfony 8 that lazily set INI values such as session.save_path. The PR replaces the complex session handler snapshot/restore system with a simpler direct session state reset approach from PR #2193, while preserving user-defined session handlers (mod_user_names) across worker requests. This fixes issue #2185 where session data was not being written to disk in worker mode with Symfony 8.0.5.
Changes:
- Removed INI value snapshot/restore mechanism that was resetting INI values between worker requests
- Replaced session handler snapshot/restore with simpler session state reset that preserves user handlers
- Updated tests to reflect that session handlers and INI values now persist across worker requests
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frankenphp.c | Removed ~150 lines of INI and session handler snapshot/restore code; added simpler frankenphp_reset_session_state() function that preserves user handlers; removed "session" from MODULES_TO_RELOAD; added conditional compilation for session support |
| frankenphp_test.go | Updated TestSessionHandlerReset_worker comments to reflect that handlers are now preserved; removed TestIniLeakBetweenRequests_worker and TestIniPreLoopPreserved_worker tests since INI values are intentionally no longer reset |
| testdata/worker-with-ini.php | Deleted test file for INI pre-loop preservation (no longer applicable) |
| testdata/ini-leak.php | Deleted test file for INI leak detection (no longer applicable) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Revert the INI snapshot/restore mechanism from #2139 which caused issues with frameworks that lazily set ini values like session.save_path (#2185). Replace the session handler snapshot/restore with a simpler direct session state reset from #2193, which preserves mod_user_names across requests without requiring session module reload. Co-Authored-By: Xavier Leune <xavier.leune@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
thanks for the PR @dunglas |
|
Thanks @xavierleune and all other people involved! |
|
@dunglas I just want to note another side effect of the ini reset: If one increase the memory limit with the ini reset, the reset can fail with errors like
|
Revert the INI snapshot/restore mechanism from #2139, which caused issues with frameworks that lazily set INI values like session.save_path (#2185). Replace the session handler snapshot/restore with a simpler direct session state reset from #2193 (cc @xavierleune), which preserves mod_user_names across requests without requiring session module reload.
Closes #2185. Closes #2192. Closes #2193.