-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Remove deprecate session service #41321
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
c1b0432
to
67cb63a
Compare
This comment has been minimized.
This comment has been minimized.
Rebase unlocked |
b7a5d3f
to
cb32334
Compare
nicolas-grekas
added a commit
that referenced
this pull request
Jun 1, 2021
…r (jderusse) This PR was merged into the 5.4 branch. Discussion ---------- [HttpKernel] Provide migration path for TestSessionListener | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - When working on #41321 I realized that #41343 was wrong for `TestSessionListener`. Injecting the factory in both SessionListener AND TestSessionListener would generate 2 distinguished session instances which is the opposite of the expected behavior: TestSessionListener needs the session used by the request to set the right sessionId in the cookie. This PR fallback to `request->getSession()` when there is no session injected in the container (ie: FrameworkBundlke:6) Commits ------- b56606e Provide migration path for TestSessionListener
@jderusse Is it still in draft mode? |
ed01205
to
1d26674
Compare
src/Symfony/Component/HttpFoundation/Session/Storage/ServiceSessionFactory.php
Outdated
Show resolved
Hide resolved
7bccfce
to
e8d240b
Compare
💚 green |
src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/EventListener/AbstractTestSessionListener.php
Outdated
Show resolved
Hide resolved
1ce3641
to
08ab7c3
Compare
08ab7c3
to
213224e
Compare
213224e
to
1bae3ef
Compare
src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php
Show resolved
Hide resolved
4ceb105
to
2127454
Compare
nicolas-grekas
added a commit
that referenced
this pull request
Sep 6, 2021
…nListener (jderusse) This PR was merged into the 5.4 branch. Discussion ---------- Make test.session.listener compatible with SF 6.0 SessionListener | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Fix flipped tests for #41321 In Symfony 6.0, the session_listener does not use `session` service anymore, it needs a `session_factory` instead. note: the `session_listener` service is properly configured: https://github.com/symfony/symfony/blob/0d61de7576d0d6807924fada3df508c5d05d8f2f/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.php#L146-L150 Commits ------- 0943685 Make test.session.listener compatible with SF 6.0 SessionListener
3f9f3c1
to
b2efa34
Compare
…re 6.0 (jderusse) This PR was merged into the 5.4 branch. Discussion ---------- Fix tests when security-http 5.4 uses security-core 6.0 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - see falling test in flipped tests for 6.0 branch: https://github.com/symfony/symfony/pull/41321/checks?check_run_id=3528227747#step:8:3572 Commits ------- 58f09e5 Fix tests when security-http 5.4 uses security-core 6.0
b2efa34
to
81ea580
Compare
* 5.4: cs fix Fix tests when security-http 5.4 uses security-core 6.0
81ea580
to
9e6a3d3
Compare
Thank you @jderusse. |
Merged
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.
To ease code review this PR only removes code for session.
Blocked by #41343