forked from GNUsocial/gnu-social
[CORE][GNUsocial] Remove Session parameter, as it's no longer a service. Use session from Request
This commit is contained in:
parent
c870fd44e3
commit
f540711948
@ -65,7 +65,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||||||
use Symfony\Component\Form\FormFactoryInterface;
|
use Symfony\Component\Form\FormFactoryInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
|
||||||
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
use Symfony\Component\Mailer\MailerInterface;
|
use Symfony\Component\Mailer\MailerInterface;
|
||||||
@ -95,7 +94,6 @@ class GNUsocial implements EventSubscriberInterface
|
|||||||
protected FormFactoryInterface $form_factory;
|
protected FormFactoryInterface $form_factory;
|
||||||
protected MessageBusInterface $message_bus;
|
protected MessageBusInterface $message_bus;
|
||||||
protected EventDispatcherInterface $event_dispatcher;
|
protected EventDispatcherInterface $event_dispatcher;
|
||||||
protected SessionInterface $session;
|
|
||||||
protected SSecurity $security;
|
protected SSecurity $security;
|
||||||
protected ModuleManager $module_manager;
|
protected ModuleManager $module_manager;
|
||||||
protected HttpClientInterface $client;
|
protected HttpClientInterface $client;
|
||||||
@ -118,7 +116,6 @@ class GNUsocial implements EventSubscriberInterface
|
|||||||
FormFactoryInterface $ff,
|
FormFactoryInterface $ff,
|
||||||
MessageBusInterface $mb,
|
MessageBusInterface $mb,
|
||||||
EventDispatcherInterface $ed,
|
EventDispatcherInterface $ed,
|
||||||
SessionInterface $sess,
|
|
||||||
SSecurity $sec,
|
SSecurity $sec,
|
||||||
ModuleManager $mm,
|
ModuleManager $mm,
|
||||||
HttpClientInterface $cl,
|
HttpClientInterface $cl,
|
||||||
@ -137,7 +134,6 @@ class GNUsocial implements EventSubscriberInterface
|
|||||||
$this->form_factory = $ff;
|
$this->form_factory = $ff;
|
||||||
$this->message_bus = $mb;
|
$this->message_bus = $mb;
|
||||||
$this->event_dispatcher = $ed;
|
$this->event_dispatcher = $ed;
|
||||||
$this->session = $sess;
|
|
||||||
$this->security = $sec;
|
$this->security = $sec;
|
||||||
$this->module_manager = $mm;
|
$this->module_manager = $mm;
|
||||||
$this->client = $cl;
|
$this->client = $cl;
|
||||||
@ -196,7 +192,7 @@ class GNUsocial implements EventSubscriberInterface
|
|||||||
|
|
||||||
// Save the target path, so we can redirect back after logging in
|
// Save the target path, so we can redirect back after logging in
|
||||||
if (!(!$event->isMainRequest() || $this->request->isXmlHttpRequest() || Common::isRoute(['login', 'register', 'logout']))) {
|
if (!(!$event->isMainRequest() || $this->request->isXmlHttpRequest() || Common::isRoute(['login', 'register', 'logout']))) {
|
||||||
$this->saveTargetPath($this->session, 'main', $this->request->getBaseUrl());
|
$this->saveTargetPath($this->request->getSession(), 'main', $this->request->getBaseUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->initialize();
|
$this->initialize();
|
||||||
|
Loading…
Reference in New Issue
Block a user