Page MenuHomePhabricator

Use PhutilClassMapQuery
ClosedPublic

Authored by joshuaspence on Jun 25 2015, 12:21 PM.
Tags
None
Referenced Files
F14014429: D13429.id.diff
Sun, Nov 3, 3:26 AM
F14014002: D13429.id32516.diff
Sat, Nov 2, 8:35 PM
F14013995: D13429.id32516.diff
Sat, Nov 2, 8:32 PM
F14013234: D13429.diff
Sat, Nov 2, 2:26 AM
F13996420: D13429.id32808.diff
Wed, Oct 23, 9:01 PM
F13993837: D13429.id32803.diff
Wed, Oct 23, 1:45 AM
F13980351: D13429.id32513.diff
Oct 19 2024, 10:04 AM
Unknown Object (File)
Oct 12 2024, 1:24 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.