Skip to content

[HttpFoundation] Compare cookie with null value as empty string in ResponseCookieValueSame #48112

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

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Nov 4, 2022

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

We already consider null as '' when we "compute" the cookie:

if ('' === (string) $this->getValue()) {

So in the related issue, self::assertResponseCookieValueSame('SOME_COOKIE_NAME', ''); could be used. WDYT @werwolf666?

@werwolf666
Copy link

Good decision. Thank you.

@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

@nicolas-grekas nicolas-grekas merged commit 1ee474f into symfony:4.4 Nov 5, 2022
@fabpot fabpot mentioned this pull request Nov 19, 2022
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