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

Skip to content

Add deprecation when the session is not FlashBagAware #46831

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 0 commits into from

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 6.2
Bug fix? no
New feature? no
Deprecations? yes
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

Follow up of #46491

Since there is now an interface for the getFlashBag method, we should add the check in the addFlash method.

@carsonbot carsonbot added this to the 6.2 milestone Jul 3, 2022
@VincentLanglet VincentLanglet force-pushed the addFlashBag branch 2 times, most recently from abab6e5 to 1d48f20 Compare July 3, 2022 16:28
'6.2',
'Calling addFlash method when the session does not implements %s is deprecated.',
FlashBagAwareSessionInterface::class
);
Copy link
Member

Choose a reason for hiding this comment

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

should be on one line to be consistent with the code base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

trigger_deprecation(
'symfony/framework-bundle',
'6.2',
'Calling addFlash method when the session does not implements %s is deprecated.',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'Calling addFlash method when the session does not implements %s is deprecated.',
'Calling "addFlash()" method when the session does not implement %s is deprecated.',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@fabpot
Copy link
Member

fabpot commented Jul 4, 2022

Thank you @VincentLanglet.

fabpot added a commit that referenced this pull request Jul 4, 2022
…(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
@fabpot fabpot closed this Jul 4, 2022
@fabpot fabpot mentioned this pull request Oct 24, 2022
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.

3 participants