mirror of
https://github.com/flarum/core.git
synced 2025-10-18 18:26:07 +02:00
Use Illuminate Session component instead of Symfony
Symfony's component relies on PHP's native session functionality, which is not ideal. It automatically sets its own cookie headers, resulting in this issue: https://github.com/flarum/core/issues/1084#issuecomment-364569953 The Illuminate component is more powerful and has a simpler API for extension with other drivers and such, and fits in nicely with other components we use (the majority of which are from Illuminate).
This commit is contained in:
committed by
Franz Liedke
parent
b4e093ab8a
commit
5672819549
@@ -34,7 +34,7 @@ use Flarum\User\Event\PasswordChanged;
|
||||
use Flarum\User\Event\Registered;
|
||||
use Flarum\User\Event\Renamed;
|
||||
use Illuminate\Contracts\Hashing\Hasher;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Illuminate\Contracts\Session\Session;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -698,7 +698,7 @@ class User extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SessionInterface
|
||||
* @return Session
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
@@ -706,9 +706,9 @@ class User extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SessionInterface $session
|
||||
* @param Session $session
|
||||
*/
|
||||
public function setSession(SessionInterface $session)
|
||||
public function setSession(Session $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
}
|
||||
|
Reference in New Issue
Block a user