8000 [TwigBridge] Fix for GitHub ticket 50789 · symfony/symfony@2f61869 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f61869

Browse files
committed
[TwigBridge] Fix for GitHub ticket 50789
Change the return type of AppVariable.php getSession from 'Session' to 'SessionInterface', to be in line with the return type of getSession in http-foundation/Request.php
1 parent 75319a2 commit 2f61869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bridge/Twig/AppVariable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Component\HttpFoundation\RequestStack;
16-
use Symfony\Component\HttpFoundation\Session\Session;
16+
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1717
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
1818
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1919
use Symfony\Component\Security\Core\User\UserInterface;
@@ -93,7 +93,7 @@ public function getRequest(): ?Request
9393
/**
9494
* Returns the current session.
9595
*/
96-
public function getSession(): ?Session
96+
public function getSession(): ?SessionInterface
9797
{
9898
if (!isset($this->requestStack)) {
9999
throw new \RuntimeException('The "app.session" variable is not available.');

0 commit comments

Comments
 (0)
0