-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Show how to change the Session Attribute Bag type #10495
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
Show how to change the Session Attribute Bag type #10495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not replace the session
service, but only replace session.attribute_bag
instead.
session/attribute_bag.rst
Outdated
arguments: ["@session.storage", "@session.namespacedattributebag", "@session.flash_bag"] | ||
|
||
session.namespacedattributebag: | ||
class: Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below line 31?
Peter, thanks for contributing these docs. We merged it in 4.2 branch (and then, master too) and we reworded it a bit. Instead of creating a short separate article ... we put this new info inside the main sessions article. Cheers! |
The Session component ships with two different attribute bag implementations, and the Symfony docs don't show how to change between them.
Fixes #10494 and StackOverflow issues like https://stackoverflow.com/questions/12279247/how-to-use-namespaced-sessions-in-symfony2
Specific feedback requests