-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Compute cookie max-age attribute #20644
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
This one breaks tests and should be done in master as this is a new feature. |
Agree on master. I improved some affected tests already in #20569, preferably that goes first :) |
I think they are not really related and this one can probably be merged much faster than the other one :) |
Fair enough :) it's not the effort anyways.. ill update tests this evening 👍 |
@@ -72,9 +72,13 @@ public function testGetPath() | |||
|
|||
public function testGetExpiresTime() | |||
{ | |||
$cookie = new Cookie('foo', 'bar', 3600); |
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.
Updated tests that are passing 3600
as expire time as well. 3600
implies max-age value, not a expire time. This was rather confusing :)
Ready. Failing test (PHP7/redis) seems unrelated. edit; apparently HHVM differs on the |
Truly ready 👍 (also no conflict with #20910) |
Thank you @ro0NL. |
This PR was merged into the 3.3-dev branch. Discussion ---------- [HttpFoundation] Compute cookie max-age attribute | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | comma-separated list of tickets fixed by the PR, if any | License | MIT | Doc PR | reference to the documentation PR, if any See https://wiki.php.net/rfc/cookie_max-age, PHP sends it since 5.5. ~~The date format actually differs now from PHP (`Saturday` instead of `Sat`). But it really doesnt matter much imo, using the constant seems more reliable to me and max-age overrules anyway ;)~~ Relates to #20569 Commits ------- 8c28317 [HttpFoundation] Compute cookie max-age attribute
See https://wiki.php.net/rfc/cookie_max-age, PHP sends it since 5.5.
The date format actually differs now from PHP (Saturday
instead ofSat
). But it really doesnt matter much imo, using the constant seems more reliable to me and max-age overrules anyway ;)Relates to #20569