Skip to content

[HttpFoundation] ensure session storages are opened in tests before destroying them #58453

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
Oct 4, 2024

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Oct 4, 2024

Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

The tests currently only pass by luck as the condition in https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php#L129 does not evaluate to true (because headers are already sent).

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit dafde68 into symfony:5.4 Oct 4, 2024
11 of 12 checks passed
@xabbuh xabbuh deleted the testing-close-open-sessions branch October 5, 2024 10:11
xabbuh added a commit to xabbuh/symfony that referenced this pull request Oct 10, 2024
The changes done in symfony#58453 were not enough. Since the session name is used
as the cookie name it must not be the empty string.
xabbuh added a commit to xabbuh/symfony that referenced this pull request Oct 10, 2024
The changes done in symfony#58453 were not enough. Since the session name is used
as the cookie name it must not be the empty string.
xabbuh added a commit that referenced this pull request Oct 11, 2024
This PR was merged into the 5.4 branch.

Discussion
----------

[HttpFoundation] session names must not be empty

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

The changes done in #58453 were not enough. Since the session name is used as the cookie name it must not be the empty string.

Commits
-------

4d595f4 session names must not be empty
symfonyaml pushed a commit to symfonyaml/symfony that referenced this pull request Oct 21, 2024
The changes done in symfony#58453 were not enough. Since the session name is used
as the cookie name it must not be the empty string.
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.

4 participants