From f540711948146ab6cf40bbc206da4948633e09c0 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Tue, 8 Mar 2022 23:53:43 +0000 Subject: [PATCH] [CORE][GNUsocial] Remove Session parameter, as it's no longer a service. Use session from Request --- src/Core/GNUsocial.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Core/GNUsocial.php b/src/Core/GNUsocial.php index ac5182b932..0f20fd5c8e 100644 --- a/src/Core/GNUsocial.php +++ b/src/Core/GNUsocial.php @@ -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();