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, Nov 20, 6:23 PM
Unknown Object (File)
Sat, Nov 16, 7:15 PM
Unknown Object (File)
Mon, Nov 11, 5:43 AM
Unknown Object (File)
Sat, Nov 9, 2:19 PM
Unknown Object (File)
Sat, Nov 9, 7:57 AM
Unknown Object (File)
Sat, Nov 9, 7:55 AM
Unknown Object (File)
Sat, Nov 9, 4:41 AM
Unknown Object (File)
Sat, Nov 9, 12:21 AM
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 20077
Build 27240: Run Core Tests
Build 27239: 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
30

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.

57

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."

69

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.