8000 merged branch krmcbride/flash-phpdoc (PR #5557) · sam57/symfony@8b7c00c · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b7c00c

Browse files
committed
merged branch krmcbride/flash-phpdoc (PR symfony#5557)
Commits ------- bb0e4c3 Fixed FlashBagInterface phpdoc, clarified UPGRADE docs Discussion ---------- Fixed FlashBagInterface phpdoc, clarified upgrade doc The fact that multiple flash messages are now stored/retrieved per type was an additional BC break that I missed when I first went through the 2.1 update doc, and it didn't help that the phpdoc was outdated. These changes just clarify things a little. --------------------------------------------------------------------------- by drak at 2012-09-20T07:45:52Z +1
2 parents 5db89bd + bb0e4c3 commit 8b7c00c

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

UPGRADE-2.1.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,8 +1332,7 @@
13321332
13331333
### Session
13341334
1335-
* Flash messages now return an array based on their type. The old method is
1336-
still available but is now deprecated.
1335+
* Using `get` to retrieve flash messages now returns an array.
13371336
13381337
##### Retrieving the flash messages from a Twig template
13391338

src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ public function add($type, $message);
3131
/**
3232
* Registers a message for a given type.
3333
*
34-
* @param string $type
35-
* @param string $message
34+
* @param string $type
35+
* @param string|array $message
3636
*/
3737
public function set($type, $message);
3838

3939
/**
40-
* Gets flash message for a given type.
40+
* Gets flash messages for a given type.
4141
*
4242
* @param string $type Message category type.
43-
* @param array $default Default value if $type doee not exist.
43+
* @param array $default Default value if $type does not exist.
4444
*
45-
* @return string
45+
* @return array
4646
*/
4747
public function peek($type, array $default = array());
4848

@@ -57,9 +57,9 @@ public function peekAll();
5757
* Gets and clears flash from the stack.
5858
*
5959
* @param string $type
60-
* @param array $default Default value if $type doee not exist.
60+
* @param array $default Default value if $type does not exist.
6161
*
62-
* @return string
62+
* @return array
6363
*/
6464
public function get($type, array $default = array());
6565

0 commit comments

Comments
 (0)
0