Skip to content

use arrays for operationIndex() to resolve array_merge TypeError#367

Open
vrodriguero wants to merge 1 commit into
algolia:masterfrom
vrodriguero:fix/reimport-operation-index-array
Open

use arrays for operationIndex() to resolve array_merge TypeError#367
vrodriguero wants to merge 1 commit into
algolia:masterfrom
vrodriguero:fix/reimport-operation-index-array

Conversation

@vrodriguero

@vrodriguero vrodriguero commented Apr 23, 2026

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue Fix #366
Need Doc update no

Describe your change

Replaced both operationIndex() calls with plain arrays, which matches the client's expected input format.

What problem is this fixing?

ReImportCommand passed OperationIndexParams model objects to SearchClient::operationIndex(), but the generated client internally calls array_merge() on that argument, causing a TypeError at runtime.

Although the client still claims to accept OperationIndexParams, that path is broken. The proposed fix resolves the issue with the reimport. I will open an issue with the Algolia client too.

- Replaced both operationIndex() calls with plain arrays
- Updated the tests
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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.

scout:reimport fails with TypeError: array_merge() expects array, OperationIndexParams given

1 participant