8000 [TwigBridge] Change return type of Symfony\Bridge\Twig\AppVariable::getSession() by Dirkhuethorst · Pull Request #50794 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[TwigBridge] Change return type of Symfony\Bridge\Twig\AppVariable::getSession() #50794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[TwigBridge] Fix for GitHub ticket 50789
Change the return type of AppVariable.php getSession from 'Session' to 'FlashBagAwareSessionInterface'
  • Loading branch information
Dirkhuethorst committed Jun 27, 2023
commit 7e04f589193ccbc79b785dec76dd856f28e352f7
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\SessionInterface;
use Symfony\Component\HttpFoundation\Session\FlashBagAwareSessionInterface;
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(): ?SessionInterface
public function getSession(): ?FlashBagAwareSessionInterface
{
if (!isset($this->requestStack)) {
throw new \RuntimeException('The "app.session" variable is not available.');
Expand Down
0