Most edge mutations are applied with TYPE_EDGE transactions, which are currently inconvenient to specialize and rarely validated.
They are selectively specialized by hard-coding behavior in PhabricatorApplicationTransaction (which is not available to extensions) or through ad-hoc hooks on PhabricatorEdgeType (which are probably not ideal).
A possible approach is to allow EdgeType to emit a ModularTransactionType that specializes behavior. Or we could continue specializing on EdgeType, although this probably leads to an EdgeType with 95% overlap with ModularTransactionType.
See also:
- T4968: Change phrasing of "task subscriber added" message
- T6974: Error when associating an already-associated Project with a Task is not very user friendly
- https://discourse.phabricator-community.org/t/phabricator-maniphest-edit-lack-validation-for-adding-project/3193/
- T13427: Task to reproduce lack of transaction object validation