phan-taint-check-plugin assumes that methods named getQueryInfo() are returning an array with tables/fields/conds/etc. We should formalize that definition somehow. I'm not exactly sure what formalizing this would mean, could be an interface or just documenting in [[mw:CC]] that methods named this should have that kind of return value. Or maybe returning a typed object instead of an array (implementing ArrayAccess for b/c)?
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
[WIP] Introduce QueryInfo | mediawiki/core | master | +538 -275 |
Related Objects
Related Objects
- Mentioned In
- T243051: A query builder for MediaWiki core
Event Timeline
Comment Actions
Note that not all getQueryInfo() methods are named that: Revision and RevisionStore have getArchiveQueryInfo(), and RevisionStore also has getSlotsQueryInfo().
Also QueryPage has a getQueryInfo() method that uses a slightly different structure for the return array from the getQueryInfo() present in other classes: "join_conds" rather than "joins" and some extra fields not present in the rest.
Comment Actions
Hmm, thanks. An interface won't work then, so I think returning a typed object would work.
Comment Actions
Change 459242 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/core@master] [WIP] Introduce QueryInfo
Comment Actions
CPT would recommend that this is part of a broader discussion that could be done via an RfC. For now we're going to put it in the Icebox.