-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Added support for string and DateTimeInterface as Cookie::$expire #19920
Conversation
PR Summary
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #19920 +/- ##
=======================================
Coverage 48.89% 48.90%
=======================================
Files 445 445
Lines 42786 42802 +16
=======================================
+ Hits 20919 20931 +12
- Misses 21867 21871 +4
☔ View full report in Codecov by Sentry. |
…Cookie::$expire` from `int` to `int|string|null`)
…overwrite existing cookie.
Ok, let's keep it as it seems that it's common thing to be prepared for other types than int. BUT since we are doing this let's allow DateTimeInterface as well. |
…r PHP 5.4 and commited missing code for \DateTimeInterface processing in `\yii\web\Response::sendCookies()`
👍🏻 |
The
\yii\httpclient\Response::parseCookie()
function sets theCookie::$expire
as string.This PR broadens the accepted types for
Cookie::$expire
fromint
toint|string|null
.