-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Update controller.rst clarifying automatic deletion for flash messages #5640
Conversation
@@ -619,8 +619,7 @@ session. | |||
Flash Messages | |||
~~~~~~~~~~~~~~ | |||
|
|||
You can also store small messages that will be stored on the user's session | |||
for exactly one additional request. This is useful when processing a form: | |||
You can also store small messages that will be stored on the user's session. This is useful when processing a form: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert this change? We wrap lines after the first word that crosses the 72nd character mark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. But what do you think about removing or modify "for exactly one additional request" sentence?. Do you think adding the tip about get()/peek() will be enough without modifiying this sentence?.
You can also store small messages that will be stored on the user's session | ||
for exactly one additional request. This is useful when processing a form: | ||
You can also store small messages that will be stored on the user's session. | ||
This is useful when processing a form: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like something went wrong here (this doesn't match the following line)
Hey @miguelvilata, can you make the change? :) |
Hello. It's neccesary clarify that flash messages aren't removed automatically when next session comes. They are removed because the use of get method in FlashBag object. If you use peek() method, or simply don't show stored messages they remain in session. Show get() method in Symfony\Component\HttpFoundation\Session\Flash\FlashBag: /** * {@inheritdoc} */ public function get($type, array $default = array()) { if (!$this->has($type)) { return $default; } $return = $this->flashes[$type]; unset($this->flashes[$type]); return $return; }
7a87637
to
da58fa3
Compare
It's my firs contribution to documentation. It is neccesary doing something more here?. Thanks. |
👍 looks great |
…lash messages (miguelvilata) This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #5640). Discussion ---------- Update controller.rst clarifying automatic deletion for flash messages Hello. It's neccesary clarify that flash messages aren't removed automatically when next session comes. They are removed because the use of get() method in FlashBag object. If you use peek() method, or simply don't show stored messages they remain in session. Show get() method in Symfony\Component\HttpFoundation\Session\Flash\FlashBag: /** * {@inheritdoc} */ public function get($type, array $default = array()) { if (!$this->has($type)) { return $default; } $return = $this->flashes[$type]; unset($this->flashes[$type]); return $return; } Commits ------- e6556b5 Update controller.rst
Replace tip by note and fix API doc reference.
Thank you @miguelvilata. I have merged your changes into the |
Thank you for your help. Miguel Vilata 2015-10-03 11:25 GMT+02:00 Christian Flothmann notifications@github.com:
|
You're welcome. Hope to see you back soon with more changes. :) |
Hello.
It's neccesary clarify that flash messages aren't removed automatically when next session comes. They are removed because the use of get() method in FlashBag object. If you use peek() method, or simply don't show stored messages they remain in session.
Show get() method in Symfony\Component\HttpFoundation\Session\Flash\FlashBag: