Skip to content

[HttpKernel] Fix compatibility with Symfony6 #41343

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 1 commit into from
May 27, 2021

Conversation

jderusse
Copy link
Member

@jderusse jderusse commented May 20, 2021

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

The session service will be removed in FrameworkBundle 6, this PR make sure the session listener 5.4 will be compatible with FrameworkBundle 6.0

@nicolas-grekas
Copy link
Member

For 5.3?

@jderusse jderusse force-pushed the deprec-session-path branch from e6dd9a1 to d415983 Compare May 20, 2021 18:30
@jderusse jderusse changed the base branch from 5.4 to 5.3 May 20, 2021 18:30
@jderusse
Copy link
Member Author

For 5.3?

Rebased.. But 5.3 is not compatible with FWB 6.0

@jderusse jderusse added this to the 5.3 milestone May 20, 2021
@jderusse jderusse force-pushed the deprec-session-path branch from d415983 to 25e79f0 Compare May 20, 2021 19:24
@jderusse jderusse changed the title Fix compatibility with Symfony 6.0 [HttpKernel] Fix compatibility with Symfony 6.0 May 21, 2021
@nicolas-grekas
Copy link
Member

Rebased.. But 5.3 is not compatible with FWB 6.0

OK, then let's go on 5.4. Don't miss adding changelog+upgrade files entries.

@nicolas-grekas nicolas-grekas modified the milestones: 5.3, 5.4 May 21, 2021
@carsonbot carsonbot changed the title [HttpKernel] Fix compatibility with Symfony 6.0 Fix compatibility with Symfony 6.0 May 21, 2021
@carsonbot carsonbot changed the title Fix compatibility with Symfony 6.0 [HttpKernel] Fix compatibility with Symfony 6.0 May 21, 2021
@carsonbot carsonbot changed the title [HttpKernel] Fix compatibility with Symfony 6.0 [FrameworkBundle][HttpKernel] Fix compatibility with Symfony 6.0 May 21, 2021
@jderusse jderusse force-pushed the deprec-session-path branch from 25e79f0 to 9b23f2a Compare May 21, 2021 16:16
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.

(blocking until proposal is discussed)

@jderusse jderusse force-pushed the deprec-session-path branch 2 times, most recently from a9e3e16 to da40387 Compare May 24, 2021 06:18
@jderusse jderusse changed the title [FrameworkBundle][HttpKernel] Fix compatibility with Symfony 6.0 [HttpKernel] Mark SessionListener Internal May 24, 2021
@jderusse jderusse force-pushed the deprec-session-path branch 2 times, most recently from ff8b9fb to b317830 Compare May 24, 2021 07:05
@jderusse jderusse force-pushed the deprec-session-path branch from b317830 to 0458384 Compare May 25, 2021 12:51
@nicolas-grekas nicolas-grekas changed the title [HttpKernel] Mark SessionListener Internal [HttpKernel] Fix compatibility with Symfony6 May 25, 2021
@carsonbot carsonbot changed the title [HttpKernel] Fix compatibility with Symfony6 [HttpKernel] Fix compatibility with Symfony6 May 25, 2021
@nicolas-grekas
Copy link
Member

Thank you @jderusse.

@nicolas-grekas nicolas-grekas merged commit cfb1016 into symfony:5.4 May 27, 2021
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 jderusse deleted the deprec-session-path branch September 4, 2021 23:04
nicolas-grekas added a commit that referenced this pull request Sep 7, 2021
…erusse)

This PR was merged into the 6.0 branch.

Discussion
----------

[FrameworkBundle] Remove deprecate session service

| Q             | A
| ------------- | ---
| Branch?       | 6.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

To ease code review this PR only removes code for session.

Blocked by #41343

Commits
-------

9e6a3d3 Remove deprecate session service
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.

6 participants