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, Apr 14, 4:26 AM
Unknown Object (File)
Thu, Apr 11, 8:11 AM
Unknown Object (File)
Thu, Apr 11, 4:52 AM
Unknown Object (File)
Fri, Mar 29, 4:33 PM
Unknown Object (File)
Thu, Mar 28, 2:02 PM
Unknown Object (File)
Tue, Mar 26, 8:08 AM
Unknown Object (File)
Tue, Mar 26, 8:08 AM
Unknown Object (File)
Tue, Mar 26, 8:03 AM
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).