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
[TwigBridge] Fix for GitHub ticket 50789
Change the return type of AppVariable.php getSession from 'Session' to 'SessionInterface'
  • Loading branch information
Dirkhuethorst committed Jul 17, 2023
commit 97fc164736dfb4f27954747129a8e5316a1c0023
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/AppVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ public function getFlashes(string|array $types = null): array
return [];
}

// In 7.0 (when symfony/http-foundation: 6.4 is required) this can be updated to
// check if the session is an instance of FlashBagAwareSessionInterface
if (!method_exists($session, 'getFlashBag')) {
return [];
}
Expand Down
0