Skip to content

Commit f91bf7d

Browse files
committed
minor #20097 ensure consistency of Symfony and standalone session code block (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- ensure consistency of Symfony and standalone session code block Commits ------- 6f8b6fe ensure consistency of Symfony and standalone session code block
2 parents 96158ed + 6f8b6fe commit f91bf7d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

session.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,13 @@ For example, imagine you're processing a :doc:`form </forms>` submission::
171171
172172
// add flash messages
173173
$flashes->add(
174-
'warning',
175-
'Your config file is writable, it should be set read-only'
174+
'notice',
175+
'Your changes were saved'
176176
);
177-
$flashes->add('error', 'Failed to update name');
178-
$flashes->add('error', 'Another error');
179177
180-
After processing the request, the controller sets a flash message in the session
181-
and then redirects. The message key (``warning`` and ``error`` in this example) can be anything:
182-
you'll use this key to retrieve the message.
178+
After processing the request, the controller sets a flash message in the
179+
session and then redirects. The message key (``notice`` in this example)
180+
can be anything. You'll use this key to retrieve the message.
183181

184182
In the template of the next page (or even better, in your base layout template),
185183
read any flash messages from the session using the ``flashes()`` method provided

0 commit comments

Comments
 (0)