Page MenuHomePhabricator

Add transactions for installing/uninstalling applications
ClosedPublic

Authored by amckinley on Apr 10 2018, 11:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 12:04 AM
Unknown Object (File)
Fri, Apr 19, 7:39 PM
Unknown Object (File)
Tue, Apr 16, 6:08 PM
Unknown Object (File)
Apr 4 2024, 12:43 AM
Unknown Object (File)
Mar 30 2024, 4:44 PM
Unknown Object (File)
Mar 30 2024, 4:44 PM
Unknown Object (File)
Mar 30 2024, 4:44 PM
Unknown Object (File)
Jan 23 2024, 1:49 PM
Subscribers

Details

Summary

Fixes T11476.

Test Plan
  • Installed/uninstalled the Conpherence application
  • Observed correct timeline stories
  • Observed correct config in database
  • Observed 404 for application page

Diff Detail

Repository
rP Phabricator
Branch
uninstall-xaction
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20073
Build 27232: Run Core Tests
Build 27231: arc lint + arc unit

Event Timeline

epriestley added inline comments.
src/applications/meta/xactions/PhabricatorApplicationUninstallTransaction.php
61–64

You should spell out two full separate variations of this for pht().

In some languages, the verb or noun or phrasing depend on the actor's gender or the subject's gender, so the proper phrasing may be:

Alice she-uninstalled the application.
Harold he-uninstalled the application.

...or:

Alice uninstalled-a-female-noun the she-application.
Alice uninstalled-a-male-noun the he-shelf.

In any case, even for languages without these rules, the words "uninstalled" and "installed" can't be translated at all right now.

(See also Internationalization.)

This revision is now accepted and ready to land.Apr 10 2018, 11:10 PM

Just want to make sure: is this the correct way to handle this?

Yep, looks good to me.

src/applications/meta/xactions/PhabricatorApplicationUninstallTransaction.php
29

It isn't terribly important, but this should probably be applyExternalEffects() instead.

The distinction is that we do:

begin_transaction();
internal_effects();
end_transaction();
external_effects();

So the theory is that "internal" effects apply to the object being edited and are covered by the transaction, and "external" effects apply to other objects.

In practice, the entire thing is now always wrapped in another transaction (since T13054) and there's probably no real difference nowadays. We should perhaps combine the phases at some point.

56

Super minor, but I think we use "this <thing>", not "the <thing>" elsewhere, at least in English. For example, "alice claimed this task." in Maniphest, not "alice claimed the task."

68

These might read slightly more cleanly as "%s uninstalled %s.", i.e. "alice uninstalled Maniphest." vs "alice uninstalled the Maniphest application."

I think we usually just say "Maniphest" elsewhere, although maybe it's mostly documentation/discussion rather than the actual software.

That's might be a little ambiguous at first glance for applications like Config or System, but you usually can't uninstall those anyway. Not sure if there there are other cases where this would be confusing.

This revision was automatically updated to reflect the committed changes.