Skip to content

Commit 66c0907

Browse files
committed
minor #14845 [HttpFoundation] deprecate the NamespacedAttributeBag class (xabbuh)
This PR was merged into the 5.3-dev branch. Discussion ---------- [HttpFoundation] deprecate the NamespacedAttributeBag class fixes #14842 Commits ------- 9df0164 deprecate the NamespacedAttributeBag class
2 parents 76801d8 + 9df0164 commit 66c0907

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

components/http_foundation/sessions.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ and "Remember Me" login settings or other user based state information.
169169
:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag`
170170
This implementation allows for attributes to be stored in a structured namespace.
171171

172+
.. deprecated:: 5.3
173+
174+
The ``NamespacedAttributeBag`` class is deprecated since Symfony 5.3.
175+
If you need this feature, you will have to implement the class yourself.
176+
172177
:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface`
173178
has the API
174179

@@ -237,6 +242,11 @@ So any processing of this might quickly get ugly, even adding a token to the arr
237242
$tokens['c'] = $value;
238243
$session->set('tokens', $tokens);
239244

245+
.. deprecated:: 5.3
246+
247+
The ``NamespacedAttributeBag`` class is deprecated since Symfony 5.3.
248+
If you need this feature, you will have to implement the class yourself.
249+
240250
With structured namespacing, the key can be translated to the array
241251
structure like this using a namespace character (which defaults to ``/``)::
242252

session.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ By default, session attributes are key-value pairs managed with the
167167
:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag`
168168
class.
169169

170+
.. deprecated:: 5.3
171+
172+
The ``NamespacedAttributeBag`` class is deprecated since Symfony 5.3.
173+
If you need this feature, you will have to implement the class yourself.
174+
170175
If your application needs are complex, you may prefer to use
171176
:ref:`namespaced session attributes <namespaced-attributes>` which are managed with the
172177
:class:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag`

0 commit comments

Comments
 (0)