Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improved the article about session flashes #10435

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

Closed
wants to merge 1 commit into from

Conversation

javiereguiluz
Copy link
Member

As discussed here symfony/demo#859 Not sure about the branch though.

@javiereguiluz
Copy link
Member Author

Which branch should we merge this in? Thanks!

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(for 3.4)

@javiereguiluz javiereguiluz added this to the 3.4 milestone Oct 8, 2018
javiereguiluz added a commit that referenced this pull request Oct 8, 2018
This PR was submitted for the 4.1 branch but it was merged into the 3.4 branch instead (closes #10435).

Discussion
----------

Improved the article about session flashes

As discussed here symfony/demo#859  Not sure about the branch though.

Commits
-------

e6ce2f4 Improved the article about session flashes
@@ -29,7 +29,7 @@ access the flash messages:

.. code-block:: html+twig

{% if app.request.hasPreviousSession %}
{% if app.request.method == 'POST' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand this change. I mean the flash entries will probably be created when processing a POST request, but the reason we register them is that we redirect at the end and we need to display them in response for the subsequent event which will be a GET request then. So with this change the flash messages are likely to never be shown.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See symfony/demo#859 for more details. People seem convinced that this is the right fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me crosspost my comment there too then. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants