Skip to content
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

Fix Symfony 6 Exception #507

Merged
merged 2 commits into from
Dec 2, 2022
Merged

Fix Symfony 6 Exception #507

merged 2 commits into from
Dec 2, 2022

Conversation

mpysiak
Copy link
Member

@mpysiak mpysiak commented Nov 29, 2022

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #506
License MIT

@mpysiak mpysiak requested a review from a team as a code owner November 29, 2022 13:34
@mpysiak mpysiak changed the title Fix #506 Fix Symfony 6 Exception Nov 29, 2022
@@ -60,7 +60,7 @@ public function handleRequest(FormInterface $form, mixed $request = null): void
return;
}

$data = $request->query->get($name);
$data = $request->query->all()[$name];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$data = $request->query->all()[$name];
$data = $request->query->all($name);

Cosmetic change 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpysiak note for the future, please either apply suggestions from the comment or answer why you don't want to do so. Please, don't just mark a comment as resolved without anything in it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lchrusciel sorry, it was my first PR 😉

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lchrusciel, it looks like this "cosmetic change" breaks in SF 5.4. Although it works in SF6. It produces an error
Unexpected value for parameter "xxx": expecting "array", got "string"

It works fine if I revert back to

$data = $request->query->all()[$name];

Co-authored-by: Jakub Tobiasz <80641364+jakubtobiasz@users.noreply.github.com>
@lchrusciel lchrusciel added the Bug Confirmed bugs or bugfixes. label Dec 2, 2022
@lchrusciel lchrusciel merged commit 910104d into Sylius:1.10 Dec 2, 2022
@lchrusciel
Copy link
Member

Hey MIchał, thank you very much for the PR! 🎉 And welcome among other Sylius contributors! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submitting form using GET method with non-scalar parameters
4 participants