-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
AbstractSessionHandler implements SessionIdInterface #47071
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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @d3n972, I see this is your first PR. Congratulations for this initiative. There is some style changes to be applied using the patch provided by fabbot in CI.
I'm not sure about the usefulness of this change. If people wants to customize the session id generator, they can implement the interface in their custom child class. The default implementation in the abstract class doesn't add value. Am I wrong?
@@ -34,7 +34,6 @@ public function open(string $savePath, string $sessionName): bool | |||
if (!headers_sent() && !\ini_get('session.cache_limiter') && '0' !== \ini_get('session.cache_limiter')) { | |||
header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) \ini_get('session.cache_expire'))); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be reverted by applying fabbot's patch. There must be a space before return
.
Add
SessionIdInterface
as implemented interface toAbstractSessionHandler
to create the possibility of creating/setting the correct session id if it is provided in an alternative manner. For example, you can implement a customcreate_sid()
method in a SessionHandler class which uses theAbstractSessionHandler
.