Page MenuHomePhabricator

Update PhortuneMerchant to Modular Transactions
ClosedPublic

Authored by chad on Mar 30 2017, 3:58 PM.
Tags
None
Referenced Files
F18631018: D17584.diff
Tue, Sep 16, 1:57 PM
F18566132: D17584.id.diff
Tue, Sep 9, 2:20 PM
F18500775: D17584.diff
Thu, Sep 4, 9:19 PM
F18464441: D17584.id.diff
Tue, Sep 2, 4:27 AM
F18463126: D17584.diff
Tue, Sep 2, 12:10 AM
F18081977: D17584.id42456.diff
Aug 5 2025, 3:18 AM
F18045497: D17584.id42299.diff
Aug 3 2025, 9:05 AM
F17959050: D17584.id.diff
Aug 1 2025, 7:38 AM
Subscribers

Details

Summary

Modernize PhortuneMerchant for Modular Transactions. Also changed the language of "Members" to "Managers", which I think fits better given the power/capability.

Test Plan
  • Create a new Merchant
  • Test not filling in a name, see error
  • Test removing myself, see error
  • Edit an existing Merchant
  • Add new managers
  • Test removing myself, see error
  • Replace Picture
  • Update various fields, contact info, email, footer
  • Verify transactions are now nice and pretty

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added inline comments.
src/applications/phortune/editor/PhortuneMerchantEditor.php
20–21

You can get rid of these, ModularTransactions figures them out automatically (part of the motivation is that you don't have to edit Editor -- or anything else in the upstream -- to add new transaction types).

src/applications/phortune/storage/PhortuneMerchantTransaction.php
17–19

Can we avoid adding new types of mail tags? Per elsewhere, I believe things will work fine without this code: mail tags are not required, and we didn't have them before.

src/applications/phortune/xaction/PhortuneMerchantInvoiceEmailTransaction.php
73

More correct as if (strlen(...))

76

Technically this one should probably be if (!strlen(...)).

77

newInvalidError

85

This should be newInvalidError().

Usage is:

  • When a field is missing but required, use newRequiredError().
  • When a field is present and invalid, use newInvalidError().

The big difference is that newRequriedError() gets ignored if setContinueOnMissingFields(true) is set on the Editor.

src/applications/phortune/xaction/PhortuneMerchantNameTransaction.php
38

This one is right ("required").

47

newInvalidError

This revision is now accepted and ready to land.Apr 11 2017, 11:45 AM
chad marked 8 inline comments as done.
  • per comments
This revision was automatically updated to reflect the committed changes.