Fix getting of page query params for D10 / Symfony 6

Created on 21 November 2023, about 1 year ago
Updated 27 March 2024, 9 months ago

After upgrading to D10, a search query that specifies page (limit and offset) params, like:

https://MYSITE/jsonapi/index/solr_node_index?filter[fulltext]=MYQUERY&include=MYFIELD&page[limit]=10&page[offset]=0

is triggering this error:

Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "page" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 83 of /var/www/webroot/vendor/symfony/http-kernel/HttpKernel.php).

It looks like a slight change to how array-type query params are fetched is necessary for compatibility with Symfony 6:
#3254250: [Symfony 6] Retrieving a non-string value from "Symfony\Component\HttpFoundation\InputBag::get()" is deprecated β†’

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jeffschuler Boulder, Colorado

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024