HomePhabricator

Give AphrontTagView a `getViewer()`, deprecate `getUser()`

Description

Give AphrontTagView a getViewer(), deprecate getUser()

Summary:
Two minor changes here:

  • Replace get/setUser() with get/setViewer() for consistency with everything else.
  • getViewer() now throws if no viewer is set. We had a lot of code that either "should" check this but didn't, or did check it in an identical way, duplicating work. In contrast, very little code checks for a viewer but works if one is not present.

Test Plan:

  • Grepped for ->user.
  • Attempted to fix all callsites inside *View classes.
  • Browsed around a bunch of applications, particularly Calendar, Differential and Diffusion, which seemed most heavily affected.

Reviewers: chad

Reviewed By: chad

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

Details

Provenance
epriestleyAuthored on Mar 6 2016, 2:26 PM
epriestleyPushed on Mar 6 2016, 5:27 PM
Reviewer
chad
Differential Revision
D15412: Give AphrontTagView a `getViewer()`, deprecate `getUser()`
Parents
rPabb4c03b476d: Remove shouldShowSubscribersProperty() from SubscribableInterface
Branches
Unknown
Tags
Unknown
Build Status
Buildable 11023
Build 13627: Run Core Tests