Skip to content

Conversation

@dereuromark
Copy link
Member

@dereuromark dereuromark commented Jan 12, 2026

Summary

  • add preserveQuery option for limitControl to control preserved query params
  • add tests for preserveQuery false/whitelist
  • simplify plugin assets copy/symlink flow to satisfy phpstan/rector on 5.x

Behavior

  • preserveQuery: true (default) keeps all query parameters as hidden fields
  • preserveQuery: false keeps none
  • preserveQuery: ["key", ...] only keeps the listed top-level keys

Docs

@markstory
Copy link
Member

add preserveQuery option for limitControl to control preserved query params

Why though?

@dereuromark
Copy link
Member Author

dereuromark commented Jan 13, 2026

limitControl() is the only paginator helper that builds a GET

and preserves current query params by turning them into hidden inputs
(generateHiddenFields()). That makes “which query params should be carried forward” a form-specific concern.

All the other paginator helpers (numbers(), prev(), next(), sort(), meta(), etc.) only generate links via generateUrl()/generateUrlParams().
They preserve query params by merging into the URL query string (via the helper config and UrlHelper::build()), not by emitting hidden inputs.
If you want to control what’s preserved there, you already do it through PaginatorHelper::options(['url' => ...]).

So the new preserveQuery option is scoped to limitControl() because it’s the only place that needs fine-grained control over hidden fields. If we want this to (based on the open ticket).

Feel free to close this if we dont need/want to support it.

@dereuromark
Copy link
Member Author

With #19182 we probably dont need this anymore.

@dereuromark dereuromark deleted the paginator-limitcontrol-preserve-query-clean branch January 14, 2026 03:42
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