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

Fix issues with extending modSessionHandler and flushing all sessions #16522

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from

Conversation

Mark-H
Copy link
Collaborator

@Mark-H Mark-H commented Feb 10, 2024

What does it do?

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

Copy link

codecov bot commented Feb 10, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (73bfd27) 21.68% compared to head (ac621d1) 21.68%.

Files Patch % Lines
core/src/Revolution/Processors/Security/Flush.php 0.00% 8 Missing ⚠️
core/src/Revolution/modSessionHandler.php 0.00% 8 Missing ⚠️
core/src/Revolution/modX.php 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                3.x   #16522   +/-   ##
=========================================
  Coverage     21.68%   21.68%           
  Complexity    10496    10496           
=========================================
  Files           561      561           
  Lines         31703    31699    -4     
=========================================
  Hits           6875     6875           
+ Misses        24828    24824    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logout all users action doesn't work with custom session handlers
2 participants