Page MenuHomePhabricator

Make Images in Pholio refer to mocks by PHID instead of ID
ClosedPublic

Authored by epriestley on Dec 19 2018, 7:21 PM.
Tags
None
Referenced Files
F14054488: D19914.diff
Sat, Nov 16, 2:09 AM
F14009844: D19914.diff
Thu, Oct 31, 12:20 AM
F14008247: D19914.diff
Tue, Oct 29, 6:30 PM
F13986400: D19914.id.diff
Mon, Oct 21, 2:39 AM
F13981706: D19914.id.diff
Oct 19 2024, 6:33 PM
F13981447: D19914.id47558.diff
Oct 19 2024, 4:36 PM
F13981422: D19914.id47534.diff
Oct 19 2024, 4:26 PM
F13981409: D19914.id47534.diff
Oct 19 2024, 4:20 PM
Subscribers
Restricted Owners Package

Details

Summary

Ref T11351. In Pholio, we currently use a mockID, but a mockPHID is generally preferable / more modern / more flexible. In particular, we need PHIDs to load handles and prefer PHIDs when exposing information to the API, and using PHIDs internally makes a bunch of things easier/better/faster and ~nothing harder/worse/slower.

I'll add some inlines about a few things.

Test Plan

Ran migrations, spot-checked database for sanity. Loaded Pholio, saw data unchanged. Created and edited images.

Diff Detail

Repository
rP Phabricator
Branch
pholio5
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/pholio/storage/PholioImage.php:40XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 21388
Build 29123: Run Core Tests
Build 29122: arc lint + arc unit

Event Timeline

Owners added a subscriber: Restricted Owners Package.Dec 19 2018, 7:21 PM
src/applications/pholio/query/PholioImageQuery.php
29–32

This has no callers, so I removed it for now. Previously, I believe Pholio only showed current versions of images, so this probably dates to that earlier time.

src/applications/pholio/storage/PholioImage.php
40–47

For now, I've just removed these keys:

  • We'll get an automatic key_phid on bin/storage upgrade by default now that we're no longer suppressing it with null.
  • We should have some kind of key_mock, but since isObsolete is never queried for it probably shouldn't be <mock, isObsolete, ...>. I'll add this key back once I figure out what it should be.
This revision is now accepted and ready to land.Dec 19 2018, 9:49 PM
This revision was automatically updated to reflect the committed changes.
src/applications/pholio/storage/PholioMock.php
262

I missed updating the actual method call here, later fixed in D21081.