Exception - Undefined class STATUS_BUILDING


#1

Following an upgrade today we were getting an undefined class STATUS_BUILDING exception whilst building the recent activity feed.

phabricator 4ef7b54bf7be9cb39f7e7056a384b5f433691542 (Mon, Feb 12)
(branched from 11c9994134935ea6358f7714e5d4d4297a617b9c on origin)
arcanist 349109426c7f9f86bfd295517e61fdf34cdbcbdc (Mon, Feb 5)
phutil f91ef416f11fa22f939f6c2211949669422983f0 (Thu, Feb 8)

I think the wrong class is being used in the case statements, here is what I changed to get it going.

diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
index 7682ab5..5dcf36a 100644
--- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
+++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
@@ -1236,21 +1236,21 @@ abstract class PhabricatorApplicationTransaction
         }
       case PhabricatorTransactions::TYPE_BUILDABLE:
         switch ($this->getNewValue()) {
-          case HarbormasterBuildable::STATUS_BUILDING:
+          case HarbormasterBuildableStatus::STATUS_BUILDING:
             return pht(
               '%s started building %s for %s.',
               $this->renderHandleLink($author_phid),
               $this->renderHandleLink(
                 $this->getMetadataValue('harbormaster:buildablePHID')),
               $this->renderHandleLink($object_phid));
-          case HarbormasterBuildable::STATUS_PASSED:
+          case HarbormasterBuildableStatus::STATUS_PASSED:
             return pht(
               '%s completed building %s for %s.',
               $this->renderHandleLink($author_phid),
               $this->renderHandleLink(
                 $this->getMetadataValue('harbormaster:buildablePHID')),
               $this->renderHandleLink($object_phid));
-          case HarbormasterBuildable::STATUS_FAILED:
+          case HarbormasterBuildableStatus::STATUS_FAILED:
             return pht(
               '%s failed to build %s for %s.',
               $this->renderHandleLink($author_phid),

#2

Thanks, see https://secure.phabricator.com/D19068.


#3

Perfect, seems I missed a couple!