♻️ simplify search methods - #217
Merged
Merged
Conversation
ianardee
force-pushed
the
better-search
branch
from
September 8, 2026 15:19
b7a51c3 to
0031e97
Compare
ianardee
force-pushed
the
better-search
branch
from
September 8, 2026 15:25
0031e97 to
22b9173
Compare
There was a problem hiding this comment.
🟡 Changes recommended
It introduces an unmarked breaking public API change (Client::search() signature) and has a couple of fixable typing/doc inconsistencies that should be addressed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR refactors the V2 search API to remove the explicit “response class” argument from Client::search() / MindeeApiV2::reqGetSearch() by moving response typing onto the corresponding BaseSearchParameters subclasses, and updates functional tests accordingly.
Changes:
- Move search response selection to
BaseSearchParameters::$responseClass+getResponseClass(), updatingModelSearchParametersandRagDocumentSearchParameters. - Rename search parameter building from
getQueryParams()togetRequestParameters()and update the HTTP layer to use it. - Update V2 functional search tests to use the simplified
Client::search(new ...Parameters(...))call style.
File summaries
| File | Description |
|---|---|
| tests/V2/Search/RagDocumentSearchFunctional.php | Updates functional test to use the new Client::search(parameters) signature. |
| tests/V2/Search/ModelSearchFunctional.php | Updates functional tests to use the new simplified search call signature. |
| src/V2/Search/RagDocuments/RagDocumentSearchParameters.php | Adds response class binding to parameters; renames request parameter method and expands docs. |
| src/V2/Search/Models/ModelSearchParameters.php | Adds response class binding to parameters; renames request parameter method and expands docs. |
| src/V2/Http/MindeeApiV2.php | Removes response-class argument and derives response type from parameters. |
| src/V2/ClientOptions/BaseSearchParameters.php | Introduces generic response binding + response-class accessor; renames parameter method. |
| src/V2/Client.php | Simplifies search() to accept only parameters and updates deprecated searchModels() guidance. |
Review details
- Files reviewed: 7/9 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ianardee
force-pushed
the
better-search
branch
from
September 8, 2026 15:29
22b9173 to
7efa74e
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.
Description
Types of changes