From da9de69de071fd70caa7d97972dfaaadc432f968 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 16 Jan 2021 11:11:08 +0100 Subject: [PATCH] deprecate the NamespacedAttributeBag class --- UPGRADE-5.3.md | 5 +++++ UPGRADE-6.0.md | 1 + src/Symfony/Component/HttpFoundation/CHANGELOG.md | 1 + .../Session/Attribute/NamespacedAttributeBag.php | 4 ++++ .../Tests/Session/Attribute/NamespacedAttributeBagTest.php | 2 ++ 5 files changed, 13 insertions(+) diff --git a/UPGRADE-5.3.md b/UPGRADE-5.3.md index 63c8d020ac366..2a59bd730d11e 100644 --- a/UPGRADE-5.3.md +++ b/UPGRADE-5.3.md @@ -23,6 +23,11 @@ Form * Deprecated passing an array as the second argument of the `RadioListMapper::mapDataToForms()` method, pass `\Traversable` instead. * Deprecated passing an array as the first argument of the `RadioListMapper::mapFormsToData()` method, pass `\Traversable` instead. +HttpFoundation +-------------- + + * Deprecate the `NamespacedAttributeBag` class + HttpKernel ---------- diff --git a/UPGRADE-6.0.md b/UPGRADE-6.0.md index 629b98f273d6b..9b190dcb26e53 100644 --- a/UPGRADE-6.0.md +++ b/UPGRADE-6.0.md @@ -79,6 +79,7 @@ FrameworkBundle HttpFoundation -------------- + * Remove the `NamespacedAttributeBag` class * Removed `Response::create()`, `JsonResponse::create()`, `RedirectResponse::create()`, `StreamedResponse::create()` and `BinaryFileResponse::create()` methods (use `__construct()` instead) diff --git a/src/Symfony/Component/HttpFoundation/CHANGELOG.md b/src/Symfony/Component/HttpFoundation/CHANGELOG.md index 25e8c727eadc9..72ffa4036316c 100644 --- a/src/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/src/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 5.3 --- + * Deprecate the `NamespacedAttributeBag` class * added `ResponseFormatSame` PHPUnit constraint 5.2.0 diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php index 7e752ddaa7ec1..1e29e92eac92f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php @@ -11,11 +11,15 @@ namespace Symfony\Component\HttpFoundation\Session\Attribute; +trigger_deprecation('symfony/http-foundation', '5.3', sprintf('The "%s" class is deprecated.', NamespacedAttributeBag::class)); + /** * This class provides structured storage of session attributes using * a name spacing character in the key. * * @author Drak + * + * @deprecated since Symfony 5.3 */ class NamespacedAttributeBag extends AttributeBag { diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index 3a3251d05b799..fe7838408d941 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -18,6 +18,8 @@ * Tests NamespacedAttributeBag. * * @author Drak + * + * @group legacy */ class NamespacedAttributeBagTest extends TestCase {