You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JSON:API: pagination links duplicate the page parameter and next does not advance #8747
With a custom page_parameter_name, the links contain the original page[number] and a flat number, and the flat one wins when the link is followed, so next stays on the same page.
Following next returns meta.currentPage: 2. Expected "next": "/books?page[number]=3&page[size]=3".
With the default config, GET /books?page[page]=2 yields "next": "/books?page=3". The page family is reserved by the spec for pagination, so the links should keep the bracket form the client used: https://jsonapi.org/format/1.1/#fetching-pagination
Cause: IriHelper::parseIri() only unsets the flat $pageParameterName (src/Metadata/Util/IriHelper.php:50), createIri() then writes it flat (:64) next to the untouched page[...] (called from src/JsonApi/Serializer/CollectionNormalizer.php:44). On the way in, JsonApiProvider hoists page[number] into number, and the raw flat number of the link loses against it (src/JsonApi/State/JsonApiProvider.php:101, :111 on 5.0).
Suggested fix: in the JSON:API collection normalizer, remove page[<name>] from the parsed query and write the new page back as page[<name>].
Activity
fix(jsonapi): keep bracket page param in links
fix(jsonapi): keep bracket page param in links (#8753)
soyuka commentedon Oct 22, 2026
fixed by #8753 (5.0)