Skip to content

♻️ harmonize search classes - #215

Merged
ianardee merged 1 commit into
mainfrom
harmonize-classes
Aug 19, 2026
Merged

♻️ harmonize search classes#215
ianardee merged 1 commit into
mainfrom
harmonize-classes

Conversation

@ianardee

Copy link
Copy Markdown
Collaborator

Description

Harmonize search response classes with other SDKs (feature not yet released)

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.

Pull request overview

This PR refactors V2 search response classes to align their namespaces/locations with other SDKs, and updates internal callers/tests/CLI to use the new namespaces.

Changes:

  • Moved ModelSearchResponse and RagDocumentSearchResponse into Mindee\V2\Search\... namespaces.
  • Updated unit/functional tests and CLI commands to import the new response classes.
  • Kept a deprecated Mindee\V2\Parsing\Search\SearchResponse as an alias to the new model search response.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/V2/Search/RagDocumentSearchTest.php Updates test import to new RAG document search response namespace.
tests/V2/Search/RagDocumentSearchFunctional.php Updates functional test imports to new RAG document search response namespace.
tests/V2/Search/ModelSearchTest.php Updates test import to new model search response namespace.
tests/V2/Search/ModelSearchFunctional.php Updates functional test imports to new model search response namespace.
src/V2/Search/RagDocuments/RagDocumentSearchResponse.php Changes namespace for the RAG document search response class.
src/V2/Search/Models/ModelSearchResponse.php Changes namespace for the model search response class.
src/V2/Parsing/Search/SearchResponse.php Deprecation alias now extends the new model search response class.
src/V2/Client.php Updates imports to use the new model search response namespace.
bin/V2/SearchRagDocumentsCommand.php Updates CLI command imports to new RAG document search response namespace.
bin/V2/SearchModelsCommand.php Updates CLI command imports to new model search response namespace.
Suppressed comments (2)

src/V2/Search/Models/ModelSearchResponse.php:8

  • Changing the namespace of ModelSearchResponse from Mindee\V2\Parsing\Search to Mindee\V2\Search\Models removes the old FQCN. With PSR-4 autoloading (composer.json maps "Mindee\" => "src"), any downstream code referencing Mindee\V2\Parsing\Search\ModelSearchResponse will now fail to autoload. If this is intended as a non-breaking refactor, add a deprecated compatibility class at src/V2/Parsing/Search/ModelSearchResponse.php that extends the new Mindee\V2\Search\Models\ModelSearchResponse (and update deprecated docs accordingly).
    src/V2/Search/RagDocuments/RagDocumentSearchResponse.php:8
  • Changing the namespace of RagDocumentSearchResponse from Mindee\V2\Parsing\Search to Mindee\V2\Search\RagDocuments removes the old FQCN. With PSR-4 autoloading, any client code still passing/using Mindee\V2\Parsing\Search\RagDocumentSearchResponse (e.g., as the $responseClass argument to Client::search) will now fail to autoload. Consider adding a deprecated compatibility class at src/V2/Parsing/Search/RagDocumentSearchResponse.php that extends the new class to keep this refactor non-breaking.

💡 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
@ianardee
ianardee merged commit 5c0ece8 into main Aug 19, 2026
115 of 119 checks passed
@ianardee
ianardee deleted the harmonize-classes branch August 19, 2026 19:36
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