Skip to content

Use correct method to set the Request Format #297

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
Apr 1, 2022
Merged

Use correct method to set the Request Format #297

merged 1 commit into from
Apr 1, 2022

Conversation

janklan
Copy link
Contributor

@janklan janklan commented Mar 16, 2022

Q A
Bug fix? yes, docs
New feature? no
Tickets n/a
License MIT

The Request::setFormat() signature is public function setFormat(?string $format, $mimeTypes) in Symfony 5.4 and public function setFormat(?string $format, string|array $mimeTypes) in Symfony 6. Both versions require two arguments to be passed. The example appears to be calling an incorrect method. Shouldn't it call Request::setRequestFormat() instead?

The `Request::setFormat()` signature is `public function setFormat(?string $format, $mimeTypes)` in Symfony 5.4 and `public function setFormat(?string $format, string|array $mimeTypes)` in Symfony 6. Both versions require two arguments to be passed. The example appears to be calling an incorrect method. Shouldn't it call `Request::setRequestFormat()` instead?
@weaverryan
Copy link
Member

Thank you Jan!

@weaverryan weaverryan merged commit 3b6e751 into symfony:2.x Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants