Skip to content

Fixed the use of Session with RequesStack #15426

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

Merged
merged 1 commit into from
Jun 10, 2021
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ controllers if you type-hint an argument with
$this->requestStack->getSession()->set('attribute-name', 'attribute-value');

// gets an attribute by name
$foo = $this->session->get('foo');
$foo = $this->requestStack->getSession()->get('foo');

// the second argument is the value returned when the attribute doesn't exist
$filters = $this->session->get('filters', []);
$filters = $this->requestStack->getSession()->get('filters', []);

// ...
}
Expand Down