Skip to content

Commit 7f421ea

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: ensure consistency of Symfony and standalone session code block
2 parents a16352d + f91bf7d commit 7f421ea

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
@@ -168,15 +168,13 @@ For example, imagine you're processing a :doc:`form </forms>` submission::
168168
169169
// add flash messages
170170
$flashes->add(
171-
'warning',
172-
'Your config file is writable, it should be set read-only'
171+
'notice',
172+
'Your changes were saved'
173173
);
174-
$flashes->add('error', 'Failed to update name');
175-
$flashes->add('error', 'Another error');
176174
177-
After processing the request, the controller sets a flash message in the session
178-
and then redirects. The message key (``warning`` and ``error`` in this example) can be anything:
179-
you'll use this key to retrieve the message.
175+
After processing the request, the controller sets a flash message in the
176+
session and then redirects. The message key (``notice`` in this example)
177+
can be anything. You'll use this key to retrieve the message.
180178

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

0 commit comments

Comments
 (0)