fix: Leave pagination params out of the at least one parameter guard - #474
Merged
Merged
Conversation
The generated guard counted limit and page_cursor as parameters, so access_codes->list(limit: 20) satisfied it while naming no filter, and a paginator satisfied it from page 2 onward purely because page_cursor was set.
razor-x
force-pushed
the
claude/php-audit-uoa7nb-m7-param-guard-scope
branch
from
August 19, 2026 22:40
12bdce1 to
77e9395
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased onto
beta(4.0.0-beta.17).The generated "at least one parameter is required" guard iterated every parameter, so
limitandpage_cursorcounted as filters. Effects:access_codes->list(limit: 20)passed the guard while naming no filter at all.page_cursorwas set, so the first page threw and later pages did not.events->list(limit: 20)passed the guard even though that endpoint is not paginated.The guard now iterates filter parameters only, and is dropped entirely for an endpoint where that leaves nothing to check.
Generated output changed in three places:
limit/page_cursorremoved from the/access_codes/listand/access_methods/listguards,limitremoved from the/events/listguard.tests/RequiredParametersTest.phpis new — these guards had no tests. Revertingsrc/Routestobetafails the four pagination-only cases.vendor/bin/phpunit(259 tests),vendor/bin/psalm, andnpm run lintare green.