Skip to content

Fix CS check failing on VIPCS 3.1 for the zone query - #164

Merged
GaryJones merged 1 commit into
developfrom
fix/vipcs-nopaging-zone-query
Oct 9, 2026
Merged

GaryJones merged 1 commit into
developfrom
fix/vipcs-nopaging-zone-query

Conversation

@GaryJones

Copy link
Copy Markdown
Contributor

Summary

VIPCS 3.1.0 (released 27 July 2026) extended WordPressVIPMinimum.Performance.NoPaging to flag posts_per_page set to -1 (VIPCS #882). The repo has no composer.lock, so CI picked up the new release and the CS check now fails on every pull request, including #163.

The only hit is the default in Zoninator::get_zone_query(), which has requested every post in a zone since the plugin's first release. The public template tags (z_get_posts_in_zone(), z_get_zone_query() and others) depend on that behaviour, and themes rendering a zone expect the full list in its curated order. Zones are hand-curated and small, and callers can already pass their own posts_per_page, so this adds a justified phpcs:ignore rather than imposing a cap that would silently drop posts from larger zones.

Once this is merged, #163 should pass after it is updated from develop.

VIPCS 3.1.0 now flags posts_per_page set to -1, so the CS check fails on
every pull request. get_zone_query() has asked for every post in a zone
since the plugin's first release, and the template tags built on it
(z_get_posts_in_zone() and friends) rely on that. Zones are curated by
hand and stay small, and callers can still pass their own limit, so the
query is safe to leave unbounded. Capping it would silently drop posts
from larger zones on themes that expect the full list.
@GaryJones
GaryJones requested a review from a team as a code owner October 9, 2026 00:23
@GaryJones GaryJones added this to the Next milestone Oct 9, 2026
@GaryJones GaryJones added the type: maintenance Routine maintenance and code quality improvements label Oct 9, 2026
@GaryJones GaryJones self-assigned this Oct 9, 2026
@GaryJones
GaryJones merged commit 868e575 into develop Oct 9, 2026
7 checks passed
@GaryJones
GaryJones deleted the fix/vipcs-nopaging-zone-query branch October 9, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Routine maintenance and code quality improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant