HomePhorge

Remove "PhabricatorFile->detachFromObject()"

Description

Remove "PhabricatorFile->detachFromObject()"

Summary:
Ref T13603. Currently, files are sometimes detached from objects. For example, when you change the image for a Macro, the old image is detached.

This is wrong: the image should remain attached so users who can view the macro can view the complete "alice change the image from X to Y" transaction. To be able to understand the change that was applied, you need to be able to view both files.

All workflows which currently detach files aren't conistent with the modern way applications behave, except maybe one callsite in a unit test, and that one's kind of moot.

Get rid of this stuff and just use PHID extraction to perform file attachment in all cases.

Test Plan: Created and edited macros, verified files were properly attached and remained attached across edits.

Maniphest Tasks: T13603

Differential Revision: https://secure.phabricator.com/D21815

Details

Provenance
epriestley <git@epriestley.com>Authored on May 12 2022, 21:05
aviveyPushed on Tue, Jul 26, 15:02
aviveyPushed on Tue, Jul 26, 15:01
Differential Revision
D25040: merge phab/master -> phorge/master
Parents
rPcfa42c5e655c: Add database storage for a dedicated file attachment table
Branches
Unknown
Tags
Unknown
Tasks
T15094: Catch up the master branch to upstream