Page MenuHomePhabricator

Move build variables into HarbormasterBuildableInterface
ClosedPublic

Authored by hach-que on Jun 18 2014, 5:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 11:41 PM
Unknown Object (File)
Sat, Dec 14, 4:52 PM
Unknown Object (File)
Fri, Dec 13, 6:25 PM
Unknown Object (File)
Fri, Dec 13, 6:24 PM
Unknown Object (File)
Fri, Dec 13, 6:24 PM
Unknown Object (File)
Fri, Dec 13, 8:58 AM
Unknown Object (File)
Thu, Dec 12, 11:07 AM
Unknown Object (File)
Tue, Nov 26, 10:19 PM
Subscribers

Details

Summary

Ref T1049. This moves the declaration of build variables onto HarbormasterBuildableInterface, allowing new classes implementing HarbormasterBuildableInterface to declare their own variables.

Test Plan

Implemented it on another class, saw the build variables appear.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hach-que retitled this revision from to Move build variables into HarbormasterBuildableInterface.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
hach-que edited edge metadata.

Fix missing conditional

epriestley edited edge metadata.

Minor inlines, looks good overall.

src/applications/harbormaster/storage/build/HarbormasterBuild.php
238–239

Yes, this is guaranteed.

240–242

Try:

$results = $object_variables + $results;

(Note that order is important; in $a = $b + $c, if a key is present in both $b and $c, the value in $b wins.)

251

Use loadObjects(): it's a little simpler, and it makes sure you don't get abstract subclasses back.

262

Then, this loop will just be foreach ($objects as $object) and you don't need new.

This revision now requires changes to proceed.Jun 20 2014, 1:56 AM
hach-que edited edge metadata.

Changes requested in code review

This revision is now accepted and ready to land.Jun 20 2014, 2:23 AM
hach-que updated this revision to Diff 23124.

Closed by commit rPf7f866445681 (authored by @hach-que).