Skip to content

♻️ simplify search methods - #217

Merged
ianardee merged 1 commit into
mainfrom
better-search
Sep 8, 2026
Merged

♻️ simplify search methods#217
ianardee merged 1 commit into
mainfrom
better-search

Conversation

@ianardee

@ianardee ianardee commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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(), updating ModelSearchParameters and RagDocumentSearchParameters.
  • Rename search parameter building from getQueryParams() to getRequestParameters() 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.

Comment thread src/V2/Client.php
Comment thread src/V2/Http/MindeeApiV2.php
Comment thread src/V2/ClientOptions/BaseSearchParameters.php
Comment thread src/V2/ClientOptions/BaseSearchParameters.php Outdated
@ianardee
ianardee merged commit b27e110 into main Sep 8, 2026
31 checks passed
@ianardee
ianardee deleted the better-search branch September 8, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants