From 6a847a6371a4dcb5626af39383a99a0df31f79b3 Mon Sep 17 00:00:00 2001 From: Gert de Pagter Date: Fri, 5 Jun 2020 00:24:36 +0200 Subject: [PATCH 1/2] Add getFlashBag to SessionInterface See also issue #36273 --- .../Component/HttpFoundation/Session/SessionInterface.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php index b2f09fd0dc713..60e60fcd2dc0b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -11,12 +11,15 @@ namespace Symfony\Component\HttpFoundation\Session; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; /** * Interface for the session. * * @author Drak + * + * @method FlashBagInterface getFlashBag() Gets the flashbag interface. - not implementing it is deprecated since Symfony 5.2 */ interface SessionInterface { From 30e24f9819d0317744697e57a37f163a75985031 Mon Sep 17 00:00:00 2001 From: Gert de Pagter Date: Fri, 5 Jun 2020 00:29:44 +0200 Subject: [PATCH 2/2] Add info to upgrade documents --- UPGRADE-5.2.md | 6 ++++++ UPGRADE-6.0.md | 2 ++ 2 files changed, 8 insertions(+) diff --git a/UPGRADE-5.2.md b/UPGRADE-5.2.md index f3a204fcce333..0a71966738453 100644 --- a/UPGRADE-5.2.md +++ b/UPGRADE-5.2.md @@ -1,6 +1,12 @@ UPGRADE FROM 5.1 to 5.2 ======================= + +HttpFoundation +--------- + +* Deprecated `SessionInterface` implementations without a `getFlashBag(): FlashBagInterface` method. + Validator --------- diff --git a/UPGRADE-6.0.md b/UPGRADE-6.0.md index 0e3449d80bb9b..7c15a1d4701b6 100644 --- a/UPGRADE-6.0.md +++ b/UPGRADE-6.0.md @@ -61,6 +61,8 @@ HttpFoundation * Removed `Response::create()`, `JsonResponse::create()`, `RedirectResponse::create()`, and `StreamedResponse::create()` methods (use `__construct()` instead) + * Added `getFlashBag(): FlashBagInterface` to `SessionInterface`. + HttpKernel ----------