Page MenuHomePhabricator

Use PhutilClassMapQuery
ClosedPublic

Authored by joshuaspence on Jun 25 2015, 12:21 PM.
Tags
None
Referenced Files
F13123102: D13429.diff
Tue, Apr 30, 8:19 AM
Unknown Object (File)
Fri, Apr 26, 9:11 PM
Unknown Object (File)
Wed, Apr 17, 7:35 PM
Unknown Object (File)
Wed, Apr 17, 7:35 PM
Unknown Object (File)
Wed, Apr 17, 4:18 AM
Unknown Object (File)
Fri, Apr 12, 2:53 AM
Unknown Object (File)
Thu, Apr 11, 10:42 AM
Unknown Object (File)
Sat, Apr 6, 11:13 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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6997
Build 7050: [Placeholder Plan] Wait for 30 Seconds
Build 7049: arc lint + arc unit

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

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
1094

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–72

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