Repository navigation
Add API v2 Search support - #2171
Merged
Merged
Conversation
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
Committed-By-Agent: goose Orbit-Session-Id: ac7fd08a-e385-4498-800e-21f51d3e4ad6
jar-stripe
marked this pull request as ready for review
October 8, 2026 02:53
jar-stripe
requested review from
justiny-stripe
and
a balanced review from Copilot
and removed request for
a team
October 8, 2026 02:53
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Auto-pagination can fail at runtime, null parameters are not handled, and the interface-breaking change has the wrong semver classification.
3 open findings
What changed in this PR
Adds API v2 Search result conversion, request handling, and POST-based auto-pagination.
Changes:
- Registers the new
V2\SearchResulttype. - Adds v2 Search request hooks and limit handling.
- Adds conversion and pagination tests.
| File | Description |
|---|---|
lib/V2/SearchResult.php |
Implements v2 Search collections and pagination. |
lib/Util/ObjectTypes.php |
Registers the response object type. |
lib/StripeClientInterface.php |
Adds the v2 Search request contract. |
lib/Service/AbstractService.php |
Adds the generated-service request hook. |
lib/BaseStripeClient.php |
Handles v2 Search requests and limits. |
init.php |
Loads the new class. |
tests/Stripe/V2/SearchResultTest.php |
Tests conversion and pagination. |
.hark/changes/2026-10-08_jar_v2-search-support.change.md |
Documents the change. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
zacchua-stripe
approved these changes
Oct 13, 2026
jar-stripe
enabled auto-merge (squash)
October 15, 2026 23:17
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.



Why?
API v2 Search returns typed
v2.search_resultcollections and paginates by sending the original request parameters with POST requests tonext_page_url. stripe-php needs a registered Search result collection and a service request hook for generated v2 Search methods.What?
SearchResultcollection.For the reviewer
v2 search requests look a lot like v1 search requests, except we use a POST instead of a GET and
limitis lifted out of the body into the query params.v2 search responses look a lot like v2 list responses except we have to remove
limitfrom the POST request body.See Also
https://go/j/DEVSDK-3316
Configuration
skip-changefile: This PR is not a user-facing change, so there's no changefile.