-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add modSessionHandlerInterface #15957
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@sergant210 can you check if this PR solves your issue? |
btw. this is kind of duplicate of #15934 I didn't notice that PR sooner |
@JoshuaLuckers My PR solves my issue ;) |
This was not the question. |
Up |
This pull request has been mentioned on MODX Community. There might be relevant details there: |
Mark-H
added a commit
to Mark-H/revolution
that referenced
this pull request
Feb 10, 2024
Closing in favour of #16522 - please see my explanation there. |
opengeek
pushed a commit
that referenced
this pull request
Aug 15, 2024
) ### What does it do? - Fixes the bugs from #15928, per #15934 - Refactored inititialization of the session handler and adopt the PHP core SessionHandlerInterface, per #15934 - Move flushing sessions logic into the session handler to optionally allow that to be extended, per #15957 ### Why is it needed? In two stale PRs #15928 and #15957 we have two proposals for dealing with some bugs and extending session handlers. While trying to figure out which one to use, I found both to have a solid approach, and wanting to use one bit of one and another part of other PR. This proposal replaces both those PRs as a middle ground, taking the most benefit from both approachs. ### Breaking changes This change includes a small breaking change in order to adopt the PHP standard SessionHandlerInterface, namely adding parameters into the open() method. There's not really any way around that in order to adopt the standard. As extending session handlers is a pretty advanced thing that I assume not many people have done, I suggest we accept that for the sake of getting closer to the standards, but make special note of this breaking change in the docs for 3.1 and the announcement to make sure people learn about it in case custom handlers need to be adjusted. ### How to test Flush sessions ### Related issue(s)/PR(s) Replaces #15934 and #15957 Fixes #15928 --------- Co-authored-by: sergant210 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla-signed
CLA confirmed for contributors to this PR.
pr/review-needed
Pull request requires review and testing.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Security\Flush
processor to the interface & handlerSecurity\Flush
processor - checks ifflushSessions
method exists in the handler class stored insession_handler_class
system setting and executes it if soWhy is it needed?
Custom session handlers can't flush all sessions.
How to test
#15928
Related issue(s)/PR(s)
Resolves #15928