-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
#7676 - Flash messages #7684
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
#7676 - Flash messages #7684
Conversation
In the context of the text I have some remarks:
Minor details, but both of them are still referring to using the session, while the examples do not use the session directly anymore (no reference to |
Besides @iltar's comment, we should also add a versionadded directive after the code example: .. versionadded:: 3.3
The `app.flashes()` method was introduced in Symfony 3.3. Prior to version 3,3
you had to use `app.app.session.flashBag`. |
Status: needs work |
We should also deprecate or refactorize or add a big warning message to this article: https://symfony.com/doc/current/session/avoid_session_start.html |
@javiereguiluz I think we should deprecate it because your new method does not longer checks the session making that part of the documentation confusing and not longer needed. |
controller.rst
Outdated
@@ -451,6 +451,10 @@ read any flash messages from the session: | |||
<?php endforeach ?> | |||
<?php endforeach ?> | |||
|
|||
.. versionadded:: 3.3 | |||
The `app.flashes()` method was introduced in Symfony 3.3. Prior to version 3.3 |
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.
Unlike Markdown, in RST files we need to use double-backticks for code:
``app.flashes()``
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.
√
Regarding the text, I think we can leave the session bit in there and do something like: "In the template of the next page (or even better, in your base layout template), read any flash messages from the session using |
By the thumbs up from @iltar I assumed the suggestion from @wouterj seems to be correct. Regarding your |
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.
👍
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.
👍
Thank you @Ricknox. |
This pull request fixes #7676 that documents the flash messages that are been changed in symfony/symfony#21819.