[CORE][GNUsocial] Remove Session parameter, as it's no longer a service. Use session from Request

This commit is contained in:
Hugo Sales 2022-03-08 23:53:43 +00:00
parent c870fd44e3
commit f540711948
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 1 additions and 5 deletions

View File

@ -65,7 +65,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Mailer\MailerInterface;
@ -95,7 +94,6 @@ class GNUsocial implements EventSubscriberInterface
protected FormFactoryInterface $form_factory;
protected MessageBusInterface $message_bus;
protected EventDispatcherInterface $event_dispatcher;
protected SessionInterface $session;
protected SSecurity $security;
protected ModuleManager $module_manager;
protected HttpClientInterface $client;
@ -118,7 +116,6 @@ class GNUsocial implements EventSubscriberInterface
FormFactoryInterface $ff,
MessageBusInterface $mb,
EventDispatcherInterface $ed,
SessionInterface $sess,
SSecurity $sec,
ModuleManager $mm,
HttpClientInterface $cl,
@ -137,7 +134,6 @@ class GNUsocial implements EventSubscriberInterface
$this->form_factory = $ff;
$this->message_bus = $mb;
$this->event_dispatcher = $ed;
$this->session = $sess;
$this->security = $sec;
$this->module_manager = $mm;
$this->client = $cl;
@ -196,7 +192,7 @@ class GNUsocial implements EventSubscriberInterface
// Save the target path, so we can redirect back after logging in
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();