Page MenuHomePhabricator

Lift class map construction into a new class map query
ClosedPublic

Authored by epriestley on Jun 22 2015, 4:44 PM.
Tags
None
Referenced Files
F18964914: D13391.diff
Fri, Nov 14, 2:13 PM
F18852959: D13391.id.diff
Fri, Oct 31, 1:19 PM
F18850701: D13391.diff
Thu, Oct 30, 6:47 PM
F18763489: D13391.id32411.diff
Oct 7 2025, 12:26 AM
F18730590: D13391.id.diff
Sep 30 2025, 1:21 PM
F18720530: D13391.diff
Sep 29 2025, 7:02 PM
F18670449: D13391.id32453.diff
Sep 25 2025, 12:21 AM
F18644336: D13391.diff
Sep 19 2025, 4:55 AM
Subscribers

Details

Summary

Ref T8637. The "load concrete subclasses" pattern has enjoyed wide success, but we're starting to collect a lot of instances of "loop over this list of things and make sure they all really have unique keys".

We can better support this, caching, subclass expansion, and sorting in a thin layer on top of PhutilSymbolLoader.

Test Plan

See next diff.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Lift class map construction into a new class map query.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, joshuaspence.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jun 22 2015, 9:11 PM
joshuaspence edited edge metadata.

This should maybe have some unit tests?

src/symbols/PhutilClassMapQuery.php
5

There's no technical reason that the parent class needs to be abstract, although that is the normal use case.

96–98

Add ```lang=php?

103–109

As above

I think we should definitely get code blocks inside source code documentation defaulting to their source file language per T5323 as a solution for the lang=php thing.

This revision was automatically updated to reflect the committed changes.

I also don't see an easy way to unit test this without building two (three? four?) separate class trees for each major case. I figure failures should be pretty obvious from usage and other getAll() tests.