-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Introduce FlashBagAwareSessionInterface #46491
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
Conversation
I think the Ci failures are not related to this PR. |
interface FlashBagAwareSessionInterface extends SessionInterface | ||
{ | ||
/** | ||
* Gets the flashbag interface. |
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.
not sure it's useful :)
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.
removed
@nicolas-grekas Hi, do you have some time to take a look at this proposal ? Thanks =) |
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.
Sounds good to me.
Thank you @VincentLanglet. |
…(VincentLanglet) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- Add deprecation when the session is not FlashBagAware | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | yes<!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Follow up of #46491 Since there is now an interface for the `getFlashBag` method, we should add the check in the `addFlash` method. Commits ------- 76bb064 Add deprecation when the session is not FlashBagAware
This solve #41765
People will be able to write
This is better than a
instanceof Session
check (which is not working with decoration).