Skip to content

Conversation

@ddevsr
Copy link
Collaborator

@ddevsr ddevsr commented Nov 10, 2025

Description
Needed #9792

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@ddevsr ddevsr added enhancement PRs that improve existing functionalities 4.7 labels Nov 10, 2025
@ddevsr ddevsr force-pushed the session-redis-persistent branch from 59fe543 to fdaa124 Compare November 10, 2025 10:25
@neznaika0
Copy link
Contributor

@ddevsr wait for the first PR to be accepted. There is no need to send an additional one in advance. What if your first PR changes?
Besides, it's not clear what exactly you're changing in this PR.

@ddevsr ddevsr force-pushed the session-redis-persistent branch from fdaa124 to 02c8284 Compare November 21, 2025 16:36
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Can we include this in the user guide? The following spot seems appropriate: https://github.com/codeigniter4/CodeIgniter4/blob/4.7/user_guide_src/source/libraries/sessions.rst?plain=1#L719-L721

Something like:

Starting with v4.7.0, you can define a persistent connection::
public string $savePath = 'tcp://localhost:6379?persistent=1';

$database = isset($query['database']) ? (int) $query['database'] : 0;
$timeout = isset($query['timeout']) ? (float) $query['timeout'] : 0.0;
$prefix = $query['prefix'] ?? null;
$persistent = isset($query['persistent']) ? (bool) $query['persistent'] : null;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can do something like filter_var($query['persistent'], FILTER_VALIDATE_BOOLEAN) instead of just casting to bool? Although if we document this property, we can leave it as it is.

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

Labels

4.7 enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants