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:
@@ -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)
|
||||
);
|
||||
|
Reference in New Issue
Block a user