1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/src/applications/passphrase
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
..
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
capability Save authorPHID on Passphrase Credentials to support "Credential Author" object policy 2015-06-22 11:28:33 -07:00
conduit Make Passphrase "token" credentials accessible via the API 2016-11-15 09:12:35 -08:00
controller Replace "Show Secret" in Passphrase with one-shot MFA 2019-01-28 09:44:08 -08:00
credentialtype Fix spelling 2017-10-09 10:48:04 -07:00
editor Update Passphrase for modular transactions 2017-05-04 11:31:37 -07:00
keys Add a "Token" Credential type 2016-03-22 12:11:58 -07:00
phid Separate handle "status" and "availability" 2015-05-14 11:14:44 -07:00
policyrule Save authorPHID on Passphrase Credentials to support "Credential Author" object policy 2015-06-22 11:28:33 -07:00
query Support Ferret engine for Passphrase credentials 2017-09-07 13:23:13 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
search Reduce the amount of boilerplate that implementing FerretInterface requires 2017-09-07 13:23:31 -07:00
storage Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
view Fix spelling 2017-10-09 10:48:04 -07:00
xaction Replace "Show Secret" in Passphrase with one-shot MFA 2019-01-28 09:44:08 -08:00