Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3cb1da

Browse files
committed
minor #16365 Explaining how to actually get the session from Request (ThomasLandauer)
This PR was submitted for the 5.3 branch but it was merged into the 5.4 branch instead. Discussion ---------- Explaining how to actually get the session from `Request` Question: Shouldn't `Request` be shown as preferred way (not `RequestStack`), since injecting `Request` is needed for forms anyway (whereas I've never needed to inject `RequestStack`)? Commits ------- 9e6b105 Explaining how to actually get the session from `Request`
2 parents fd05611 + 9e6b105 commit f3cb1da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

session.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Check out the Symfony config reference to learn more about the other available
135135
Basic Usage
136136
-----------
137137

138-
The session is available through the Request and the RequestStack.
138+
The session is available through ``->getSession()`` from the ``Request`` and the ``RequestStack``.
139139
Symfony provides a request_stack service that is injected in your services and
140140
controllers if you type-hint an argument with
141141
:class:`Symfony\\Component\\HttpFoundation\\RequestStack`::

0 commit comments

Comments
 (0)