Page MenuHomePhabricator

Use PhutilClassMapQuery
ClosedPublic

Authored by joshuaspence on Jun 25 2015, 12:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 6:25 PM
Unknown Object (File)
Sun, Dec 22, 3:45 AM
Unknown Object (File)
Sun, Dec 22, 3:23 AM
Unknown Object (File)
Thu, Dec 12, 1:36 PM
Unknown Object (File)
Tue, Dec 10, 8:38 PM
Unknown Object (File)
Fri, Dec 6, 5:15 AM
Unknown Object (File)
Fri, Dec 6, 5:15 AM
Unknown Object (File)
Fri, Dec 6, 5:15 AM
Subscribers
Tokens
"Piece of Eight" token, awarded by epriestley.

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rPf695dcea9ee8: Use PhutilClassMapQuery
Summary

Use PhutilClassMapQuery where appropriate.

Test Plan

Browsed around the UI to verify things seemed somewhat working.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Use PhutilClassMapQuery.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
  • This is great.
  • One actual functional bug inline, I think (HarbormasterBlueprint).
  • Let's hold the rest of this until after I promote stuff to stable in about 48 hours, just because I'm worried there will be some weird thing with sorting or caching that's not very obvious but will break something, and this is hard to test exhaustively.
src/applications/base/PhabricatorApplication.php
392–393

You could probably put the sorting in the Query here, too.

src/applications/celerity/resources/CelerityPhysicalResources.php
22

We could maybe simplify this one at some point by adding a getAndValidateName() (or getNameForClassMap()?) method that handles the validation inside the MapQuery:

$name = $this->getName();
// validate here
return $name;
src/applications/drydock/blueprint/DrydockBlueprintImplementation.php
377

I think getType is not guaranteed to be unique. It describes a resource type, but multiple blueprints can provide different ways to build the same sort of resource (for example, an "EC2" blueprint and a "WindowsAzure" blueprint could both build "host" resources).

src/applications/herald/adapter/HeraldAdapter.php
1028

This one is correct, I believe.

src/applications/policy/capability/PhabricatorPolicyCapability.php
85

I think these weren't sorted before, although I think sorting them is OK.

Oh, there's also one more of these that only exists in the redesign-2015 branch (CelerityPostprocessor).

joshuaspence marked 3 inline comments as done.
joshuaspence edited edge metadata.

Changes as requested

epriestley edited edge metadata.

I promoted to stable, so this is good to go.

This revision is now accepted and ready to land.Jun 27 2015, 3:47 PM
This revision was automatically updated to reflect the committed changes.
src/applications/almanac/servicetype/AlmanacServiceType.php
70

Missed this -- this one used to key by classname, which is used elsewhere, but now keys by human-readable name. See T8780.