Problem/Motivation
Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\BadRequestHttpException: "Input value "field_name" contains a non-scalar value." at HttpKernel.php line 83
This error started with Drupal 10, my code worked for years in D8 and D9.
Steps to reproduce
Retrieve an array from the request query
$field_name = \Drupal::request()->query->get('field_name');
the array can be a checkboxes field in a exposed form
Proposed resolution
The workaround I found is to get my array using the all() method, like this:
$field_name = \Drupal::request()->query->all()['field_name']
The API should expect array too, as it did in the past.
But since this seems to be Symfony related, we might not have much to do.
My report could help others that are migrating from D8+ > D10+ tho.