Skip to content

Commit

Permalink
[TwigBridge] Fix for GitHub ticket 50789
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dirkhuethorst committed Jun 27, 2023
1 parent 75319a2 commit aafaf89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Twig/AppVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\User\UserInterface;
Expand Down Expand Up @@ -93,7 +93,7 @@ public function getRequest(): ?Request
/**
* Returns the current session.
*/
public function getSession(): ?Session
public function getSession(): ?SessionInterface
{
if (!isset($this->requestStack)) {
throw new \RuntimeException('The "app.session" variable is not available.');
Expand Down

0 comments on commit aafaf89

Please sign in to comment.