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
Unknown Object (File)
Thu, Mar 21, 4:59 PM
Unknown Object (File)
Feb 8 2024, 9:17 PM
Unknown Object (File)
Feb 7 2024, 3:43 PM
Unknown Object (File)
Feb 3 2024, 5:16 AM
Unknown Object (File)
Jan 17 2024, 1:47 AM
Unknown Object (File)
Jan 3 2024, 6:21 AM
Unknown Object (File)
Dec 27 2023, 12:23 AM
Unknown Object (File)
Dec 26 2023, 6:09 PM
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.