1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 03:14:33 +02:00

Upgrade to stable cookie dependency

This commit is contained in:
Franz Liedke
2015-06-03 10:17:59 +02:00
parent 5151a5aef5
commit 9564778701
3 changed files with 12 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
<?php namespace Flarum\Forum\Actions;
use Dflydev\FigCookies\FigCookies;
use Dflydev\FigCookies\FigResponseCookies;
use Dflydev\FigCookies\SetCookie;
use Psr\Http\Message\ResponseInterface;
@@ -9,7 +9,7 @@ trait WritesRememberCookie
protected function withRememberCookie(ResponseInterface $response, $token)
{
// Set a long-living cookie (two weeks) with the remember token
return FigCookies::setResponseSetCookie(
return FigResponseCookies::set(
$response,
SetCookie::create('flarum_remember', $token)->withMaxAge(14 * 24 * 60 * 60)
);
@@ -18,7 +18,7 @@ trait WritesRememberCookie
protected function withForgetCookie(ResponseInterface $response)
{
// Delete the cookie by setting it to an expiration date in the past
return FigCookies::setResponseSetCookie(
return FigResponseCookies::set(
$response,
SetCookie::create('flarum_remember')->withMaxAge(-2628000)
);