-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Deprecate session.storage service #40048
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e6f0c16
to
f69003f
Compare
Hey! Great work. I told my friends about this PR, they too were impressed. I think @mtarld has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
mtarld
reviewed
Feb 1, 2021
src/Symfony/Component/HttpKernel/EventListener/SessionListener.php
Outdated
Show resolved
Hide resolved
f69003f
to
8e8fa6b
Compare
ro0NL
reviewed
Feb 3, 2021
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Show resolved
Hide resolved
recipes should be updated as well 👍🏻 |
e8e50ef
to
624f422
Compare
derrabus
approved these changes
Feb 9, 2021
src/Symfony/Component/HttpFoundation/Session/Storage/ServiceSessionFactory.php
Outdated
Show resolved
Hide resolved
mtarld
approved these changes
Feb 9, 2021
624f422
to
448911e
Compare
448911e
to
37c5915
Compare
fabpot
approved these changes
Feb 14, 2021
Thank you @jderusse. |
Merged
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following the deprecation of
session
service, this PR deprecate other services that contains state:session.storage
session.storage
session.storage.native
,session.storage.php_bridge
andsession.storage.mock_file
session.storage.metadata_bag
Because people can inject / decorate override all these services, providing a migration path like I did with
session
would have been very hard. That's why, I added a newopt-in
flag:When people use
framework.session: true
orframework.session.storage_id
the previous behavior is kept and deprecation are triggered when accessing the services.But when people use the new
framework.session.storage_factory_id
configuration, the previous services (session.storage.*
) are deleted (in case people would try to inject the legacysession.storage*
services and would have expect to manipulate the same objects as the object injected in the session)