-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Add support for mysql unix_socket and charset in PdoSessionHandler::buildDsnFromUrl #40300
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
bcremer
commented
Feb 25, 2021
Q | A |
---|---|
Branch? | 5.x |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | Fix #40290 |
License | MIT |
Doc PR | symfony/symfony-docs#... |
254168a
to
b19f7c1
Compare
Travis CI fail seems to be unrelated. |
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.
Thank you.
Just a small thing and I'll be happy to merge.
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
Outdated
Show resolved
Hide resolved
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.
(after @Nyholm's comment has been addressed)
Added a commit but I'm not sure if the added complexity is worth it. The documentation states:
Still it works fine when port and host are given. So I would argue it's up the the user not specify a host that's not localhost when using the unix_socket param. |
9f2866f
to
7958f6b
Compare
cbbc143
to
bdc03bc
Compare
I moved around the logic in a way so it became more clear and (hopefully) less complex. Basically: "If you are doing |
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.
@bcremer I would be happy to see what you think.
@Nyholm Looks like an reasonable improvement for me. Maybe add the following testcase to be sure the charset option works also when unix_socket is not given:
|
Great idea. |
2488b3c
to
474bda3
Compare
474bda3
to
98dfb6c
Compare
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
Show resolved
Hide resolved
…SessionHandler::buildDsnFromUrl
98dfb6c
to
f4e50fb
Compare
Thank you @bcremer. |