Page MenuHomePhorge

Add phpDoc to PhabricatorCursorPagedPolicyAwareQuery
Needs ReviewPublic

Authored by amybones on Fri, May 30, 20:06.

Details

Reviewers
None
Group Reviewers
O1: Blessed Committers
Summary

Adding class templates to PhabricatorPolicyAwareQuery and
PhabricatorCursorPagedPolicyAwareQuery to make execute() have the right
return signature, when the query classes are also annotated. Otherwise, the
return type is inferred as PhabricatorPolicyInterface as before.

Test Plan

Add some annotations to query classes and see that $query->execute() infers
the more specific return type.

Diff Detail

Repository
rP Phorge
Branch
query_templates (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2026
Build 2026: arc lint + arc unit

Event Timeline

Hmm.. clearly I need to set xdebug.mode correctly, but I'm not sure why it wasn't. It's been fine before.

Yes to the idea however a related elephant in the room (IMHO) are those non-standard types like list or map or wild being replaced, no clue if that has any effects on...something™ (Diviner docs? Code?) as I haven't managed to understand the consequences of code in https://we.phorge.it/source/arcanist/browse/master/src/parser/PhutilTypeSpec.php yet. (Technically speaking map and list seem to be just arrays, indeed.)