Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
General code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Aug 2025 at 06:28 UTC
Updated:
21 Sep 2025 at 12:49 UTC
Jump to comment: Most recent
Comments
Comment #4
neerajsinghCreated a MR with, updates to doc comments for array. This needs to be reviewed for any further data type updates.
Comment #5
drunken monkeyThanks, that’s a great start!
However, just looking at
IndexandIndexInterfaceI saw a bunch of more places where types were too unspecific (and even found a bug, #3541714: Fix Index::setProcessors() to not assume $processors is keyed by plugin ID, though that‘s beside the point). Not really sure how we can get close to a complete MR for this. Seems like a ton of work, and very hard to review and validate. But just doing this piecemeal is also a bit unsatisfactory (and hard to not lose track).Suggestions are welcome.
Comment #6
drunken monkeyCleaned up the rest of
IndexandIndexInterfaceand then just merged this as a first step.Judging by
git grep -lE '@(param|var|return) (array( |$)|.*\[\])', there are now still 178 files with … 623 (potentially) suboptimal type hints left. I think form or render arrays can probably keep the simplearraytype hint, but probably there’s no other place where we cannot improve this (orTYPE[]) toarray<KEY_TYPE, TYPE>orlist<TYPE>.So, maybe child issues for separate batches of these files, or maybe based on parent directory? What would be a good batch size?
I don’t want to divide this too finely and just create a huge flood of contrib credits, but it is tedious work and I don’t think anyone is willing to create or review a single MR for 50 files of this.