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/transactions/engineextension
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
..
PhabricatorApplicationObjectMailEngineExtension.php Add basic support for mail "stamps" to improve client mail routing 2018-02-06 04:04:13 -08:00
PhabricatorCommentEditEngineExtension.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhabricatorEditEngineExtension.php Organize bulk edit actions into nice groups 2018-01-19 13:22:25 -08:00
PhabricatorEditEngineExtensionModule.php Redesign Config Application 2016-08-29 15:49:49 -07:00
PhabricatorEditorExtension.php Provide an Editor extension point for transaction validation 2019-01-30 06:18:41 -08:00
PhabricatorEditorExtensionModule.php Provide an Editor extension point for transaction validation 2019-01-30 06:18:41 -08:00
PhabricatorEditorMailEngineExtension.php When a change removes recipients from an object, send them one last email 2018-02-08 06:28:11 -08:00
PhabricatorSubtypeEditEngineExtension.php Replace the informal "array" subtype map with a more formal "SubtypeMap" object 2018-12-09 16:37:35 -08:00
PhabricatorTransactionsDestructionEngineExtension.php Fully modularize DestructionEngine 2015-12-21 17:03:44 -08:00
PhabricatorTransactionsFulltextEngineExtension.php Index only the first 1,000 comments on any object 2018-06-22 17:41:05 -07:00