Skip to content

[HttpFoundation] Allow setting session options via DSN #41268

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

Merged
merged 1 commit into from
Oct 20, 2021
Merged

[HttpFoundation] Allow setting session options via DSN #41268

merged 1 commit into from
Oct 20, 2021

Conversation

makraz
Copy link
Contributor

@makraz makraz commented May 18, 2021

Q A
Branch? 5.4 for bug fixes
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41071
License MIT
Doc PR N/A

@nicolas-grekas
Copy link
Member

Thanks for the PR. This looks like a new feature to me. As such, that's for 5.4.
Looking at other handlers, they would too benefit from options.
Also, MemcachedSessionHandler uses expiretime instead of ttl and defaults to 86400 instead of ini_get('session.gc_maxlifetime') 🤦
Can you please have a look and try to add some consistency there?
Don't forget to update the CHANGELOG of the component while doing so.
Thanks!

@nicolas-grekas nicolas-grekas added this to the 5.x milestone May 18, 2021
@makraz
Copy link
Contributor Author

makraz commented May 19, 2021

Thanks for the PR. This looks like a new feature to me. As such, that's for 5.4.
Looking at other handlers, they would too benefit from options.
Also, MemcachedSessionHandler uses expiretime instead of ttl and defaults to 86400 instead of ini_get('session.gc_maxlifetime') 🤦
Can you please have a look and try to add some consistency there?
Don't forget to update the CHANGELOG of the component while doing so.
Thanks!

@nicolas-grekas thank you for the feedback. I updated the PR to let other handlers benefit from options.

@carsonbot carsonbot changed the title Set prefix/ttl in RedisSessionHandler settings via DSN [HttpFoundation] Set prefix/ttl in RedisSessionHandler settings via DSN Jun 22, 2021
@nicolas-grekas nicolas-grekas changed the title [HttpFoundation] Set prefix/ttl in RedisSessionHandler settings via DSN [HttpFoundation] Allow setting session options via DSN Jun 22, 2021
@nicolas-grekas
Copy link
Member

@makraz I force-pushed some changes on your fork. Could you please fetch it and add some test cases?

@makraz
Copy link
Contributor Author

makraz commented Jun 23, 2021

@makraz, I force-pushed some changes on your fork. Could you please fetch it and add some test cases?

Thank you, @nicolas-grekas, for the update. I will work on the test cases

@nicolas-grekas
Copy link
Member

Friendly ping @makraz (rebase needed also)

@nicolas-grekas
Copy link
Member

Thank you @makraz.

@nicolas-grekas
Copy link
Member

Btw, PR adding tests + another adding doc would be really welcomed.

@makraz makraz deleted the redis-session-handler-options-issue branch October 20, 2021 10:25
@makraz
Copy link
Contributor Author

makraz commented Oct 20, 2021

Btw, PR adding tests + another adding doc would be really welcomed.

Thanks @nicolas-grekas for merging my PR, and sure I will handle it 🙌

This was referenced Nov 5, 2021
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.

[Session] Not possible to set prefix/ttl in RedisSessionHandler settings via DSN
4 participants