@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace nonexistent "withPHIDs()" in ChangesetQuery with "withIDs()"

Summary:
Ref T13519. See <https://discourse.phabricator-community.org/t/error-call-to-undefined-method-differentialchangesetquery-withphids/3816/>.

Changesets do not have PHIDs, and the Query has no "withPHIDs()" method. The keys in the viewstate storage are (usually) IDs.

Test Plan:
- On a revision with Diff 1 and Diff 2 affecting the same file:
- Viewed Diff 1.
- Hid file A.
- Viewed Diff 2.
- Before patch: exception about call to "withPHIDs()", which does not exist for ChangesetQuery.
- After patch: no exception. Also, file actually unhid, which is the correct behavior!

Maniphest Tasks: T13519

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

+2 -2
+2 -2
src/infrastructure/diff/viewstate/PhabricatorChangesetViewStateEngine.php
··· 197 197 $entries = isort($entries, 'epoch'); 198 198 199 199 if ($entries) { 200 - $other_phid = last_key($entries); 200 + $other_key = last_key($entries); 201 201 $other_spec = last($entries); 202 202 203 203 $this_version = (int)$changeset->getDiffID(); ··· 213 213 214 214 $other_changeset = id(new DifferentialChangesetQuery()) 215 215 ->setViewer($viewer) 216 - ->withPHIDs(array($other_phid)) 216 + ->withIDs(array($other_key)) 217 217 ->executeOne(); 218 218 219 219 $is_modified = false;