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

[FrameworkBundle] Deprecate flashbag and attributebag services #36273

Merged

Conversation

warslett
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? no
Deprecations? yes
Tickets Related to #10557
Related to PR #36063
License MIT

FlashBag and AttributeBag are data objects and so should not be available via the service container. The preferred method for accessing these objects is via
$session->getFlashBag() or $session->getAttributeBag()

@warslett warslett changed the title Deprecate flashbag and attributebag services [FrameworkBundle] Deprecate flashbag and attributebag services Mar 30, 2020
@warslett warslett force-pushed the deprecate-flashbag-and-attributebag-services branch from 63fef32 to 2e4bc95 Compare March 30, 2020 18:55
@nicolas-grekas nicolas-grekas added this to the next milestone Mar 31, 2020
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.

Thanks, just minor comments on my side.

UPGRADE-5.1.md Outdated Show resolved Hide resolved
src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md Outdated Show resolved Hide resolved
UPGRADE-6.0.md Outdated Show resolved Hide resolved
@warslett warslett force-pushed the deprecate-flashbag-and-attributebag-services branch from f35df01 to 4baed97 Compare March 31, 2020 20:30
@warslett
Copy link
Contributor Author

rebased to resolve conflicts

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Mar 31, 2020

Actually, please rebase again to account for #35778, thanks :)

@warslett
Copy link
Contributor Author

@nicolas-grekas rebased and now using new deprecated attributes. Nice feature @atailouloute

@fabpot
Copy link
Member

fabpot commented Apr 1, 2020

Thank you @warslett.

@BackEndTea
Copy link
Contributor

I agree that this shouldn't be injected, however i'm running into an issue with this deprecation, namely:

The SessionInterface does not have the getFlashBag method that the Session does have. And the Session isnt' available for contsturcot injection, unlike the interface.

Maybe this method should be added to the interface?

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.

None yet

6 participants