Repository navigation
fix: use the new cursor and page size when fetching the next page - #404
Merged
Justin Hammond (Justintime50) merged 5 commits intoNov 30, 2026
Merged
Justin Hammond (Justintime50) merged 5 commits into
Justin Hammond (Justintime50) merged 5 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Alex Castillo González (pcbeingused33)
requested review from
a team
as code owners
November 27, 2026 04:27
Stephen Watkins (stephenjwatkins)
approved these changes
Nov 30, 2026
Justin Hammond (Justintime50)
merged commit Nov 30, 2026
56baf79
into
EasyPost:master
7 checks passed
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.
getNextPage()can return the same page over and over, so a loop over pages never advances (description below, no linked issue).The params of the previous request are stored in
_paramsand merged on top of the new ones (array_merge($params, $userParams)), so an olderbefore_id/after_idreplaces the new cursor, and an olderpage_sizereplaces the$pageSizeargument. This happens when the first call already contained a cursor, and also with a plainall(): the second page stores its ownbefore_idin_params, so the third request asks for the second page again.The previous params are now the base, and the new cursor (plus
$pageSizewhen given) is applied after them, inBaseService::getNextPageResourcesandUserService::getNextPageOfChildren. Other filters are still carried over, but the opposite cursor is dropped (after_idonbefore_idpages,before_idon children pages), since the API rejects a request with both.ReportService::all()now stores_paramstoo, soReportService::getNextPagegets the same fix and keeps params such aspage_size.Also bumps the version to 8.10.1 and moves the changelog entry under
v8.10.1.Testing
The existing cassettes replay unchanged with the new param order; they were not re-recorded, since that needs EasyPost API keys. The full suite passes locally, and
phpcsandphpstanpass.Pull Request Type
This change was prepared with the help of an AI coding assistant.