Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the session handlers all compatible with SessionHandlerInterface #5012

Merged

Conversation

paulbalandan
Copy link
Member

Description
Related to #4883

Reference for the updated signatures: https://www.php.net/manual/en/class.sessionhandlerinterface.php
I've refactored and cleaned the code a bit as I see fit.

My only concern is for the gc method. Our current implementation is using the pre-7.1 behavior where it returns true on success. Starting PHP 7.1, on success it should return the number of garbage collected sessions. My initial solution is to turn true to 1 for handlers where the number can't easily be determined while returning the true number on others (like the file handler).

Checklist:

  • Securely signed commits

@paulbalandan paulbalandan force-pushed the session-handler-interface branch from d869d4e to 8b60684 Compare August 19, 2021 03:36
@paulbalandan paulbalandan force-pushed the session-handler-interface branch from 8b60684 to 0cbd332 Compare August 19, 2021 03:42
@paulbalandan paulbalandan merged commit a4ff0e9 into codeigniter4:develop Aug 19, 2021
@paulbalandan paulbalandan deleted the session-handler-interface branch August 19, 2021 14:59
@paulbalandan paulbalandan mentioned this pull request Aug 20, 2021
15 tasks
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