-
Notifications
You must be signed in to change notification settings - Fork 96
Add dynamic return type to ResponseHeaderBag::getCookies #242
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
Add dynamic return type to ResponseHeaderBag::getCookies #242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry that asking for runtime value of ResponseHeaderBag::COOKIES_ARRAY
might fail here in some projects. Can you please check for ClassConstFetch
and check that the user fetches the right constant here? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the guidance, not sure if this is the way you meant, let me know otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also test the FLAT scenario.
Thank you!
An attempt to make
ResponseHeaderBag::getCookies()
return dynamic type based on:https://github.com/symfony/symfony/blob/c112bf116f8d4eb2d44a70dffaed8d7f4f10e521/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php#L225
which when
array
is passed, returns$this->cookies
which contains:https://github.com/symfony/symfony/blob/c112bf116f8d4eb2d44a70dffaed8d7f4f10e521/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php#L184