1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-11 08:06:13 +01:00
phorge-phorge/src/applications/phortune/storage
epriestley 9f5e6bee90 Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw"
Summary:
Depends on D20115. See <https://discourse.phabricator-community.org/t/transaction-search-endpoint-does-not-work-on-differential-diffs/2369/>.

Currently, `getApplicationTransactionCommentObject()` throws by default. Subclasses must override it to `return null` to indicate that they don't support comments.

This is silly, and leads to a bunch of code that does a `try / catch` around it, and at least some code (here, `transaction.search`) which doesn't `try / catch` and gets the wrong behavior as a result.

Just make it `return null` by default, meaning "no support for comments". Then remove the `try / catch` stuff and all the `return null` implementations.

Test Plan:
  - Grepped for `getApplicationTransactionCommentObject()`, fixed each callsite / definition.
  - Called `transaction.search` on a diff with transactions (i.e., not a sourced-from-commit diff).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: jbrownEP

Differential Revision: https://secure.phabricator.com/D20121
2019-02-07 14:56:38 -08:00
..
PhortuneAccount.php Allow Phortune accounts to customize their billing address and name 2019-01-16 16:16:27 -08:00
PhortuneAccountTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhortuneCart.php Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
PhortuneCartTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhortuneCharge.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
PhortuneDAO.php Phortune v0 2013-03-28 09:10:34 -07:00
PhortuneMerchant.php Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
PhortuneMerchantTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhortunePaymentMethod.php Add card expiration information to Phortune cart screen 2018-06-02 18:23:44 -07:00
PhortunePaymentProviderConfig.php Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
PhortunePaymentProviderConfigTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhortuneProduct.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
PhortunePurchase.php Support basic ad-hoc invoices in Phortune 2015-04-20 10:05:22 -07:00
PhortuneSchemaSpec.php Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
PhortuneSubscription.php Add an after-purchase hook to subscriptions in Phortune 2017-07-07 16:39:47 -07:00