Skip to content
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

[HttpFoundation] AutExpireFlashBag should not clear new flashes #25182

Merged

Conversation

@Simperfit
Copy link
Contributor

@Simperfit Simperfit commented Nov 28, 2017

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #9318
License MIT
Doc PR none

I feel like very happy ! :)
But don't worry I'm.

img_2826

@sroze
Copy link
Member

@sroze sroze commented Nov 28, 2017

Tests? :)

Loading

@Simperfit
Copy link
Contributor Author

@Simperfit Simperfit commented Nov 28, 2017

There are no way to return new, so If I add a test It will be the same as the all or the clear one.

Loading

@sroze
Copy link
Member

@sroze sroze commented Nov 28, 2017

And you've got one now 😉

I believe that it's a real bug.

Loading

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Nov 28, 2017
@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Nov 28, 2017

ping @Tobion I guess

Loading

Tobion
Tobion approved these changes Nov 28, 2017
Copy link
Member

@Tobion Tobion left a comment

👍 get() does not clear the new flashes. So all() should not either.

Loading

@fabpot
Copy link
Member

@fabpot fabpot commented Nov 28, 2017

The current behavior is intended. That's not a bug. A flash is something you can get once and only once, no matter if you get it for the current or the next request.

Loading

@sroze
Copy link
Member

@sroze sroze commented Nov 28, 2017

Loading

@fabpot
Copy link
Member

@fabpot fabpot commented Nov 29, 2017

I should have read the code first. The code is weird indeed, as all() does not return the new ones, only the previous ones. So, the fix looks fine.

Loading

fabpot
fabpot approved these changes Nov 29, 2017
@fabpot
Copy link
Member

@fabpot fabpot commented Nov 29, 2017

Thank you @Simperfit.

Loading

@fabpot fabpot merged commit 706201e into symfony:2.7 Nov 29, 2017
3 checks passed
Loading
fabpot added a commit that referenced this issue Nov 29, 2017
…ashes (Simperfit, sroze)

This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] AutExpireFlashBag should not clear new flashes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #9318
| License       | MIT
| Doc PR        | none

I feel like very happy ! :)
But don't worry I'm.

![img_2826](https://user-images.githubusercontent.com/3451634/33304006-99d44f38-d406-11e7-93f2-4dbc19891299.jpg)

Commits
-------

706201e Test that it do not remove the new flashes when displaying the existing ones
7fe3fe8 [HttpFoundation] AutExpireFlashBag should not clear new flashes
@Simperfit
Copy link
Contributor Author

@Simperfit Simperfit commented Nov 29, 2017

Loading

@fabpot fabpot mentioned this pull request Nov 30, 2017
@fabpot fabpot mentioned this pull request Nov 30, 2017
@fabpot fabpot mentioned this pull request Dec 4, 2017
@fabpot fabpot mentioned this pull request Dec 4, 2017
@fabpot fabpot mentioned this pull request Dec 4, 2017
@Simperfit Simperfit deleted the bugfix/auflashbag-should-not-clear-flashes-in-new branch May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants