Page MenuHomePhabricator

Add "assert_same_keys()" to "libphutil/"
ClosedPublic

Authored by epriestley on Mar 11 2019, 4:44 AM.
Tags
None
Referenced Files
F15506473: D20268.diff
Tue, Apr 15, 11:32 AM
F15503652: D20268.diff
Mon, Apr 14, 11:47 AM
F15493020: D20268.id48398.diff
Sat, Apr 12, 8:51 PM
F15479511: D20268.id48398.diff
Tue, Apr 8, 7:45 AM
F15477824: D20268.id48383.diff
Mon, Apr 7, 6:01 PM
F15470460: D20268.id.diff
Fri, Apr 4, 10:29 PM
F15467222: D20268.diff
Thu, Apr 3, 1:48 PM
F15449674: D20268.id.diff
Fri, Mar 28, 11:36 AM
Subscribers
None

Details

Summary

This makes an implementation a little cleaner in an upcoming workboards diff.

This is like array_keys($x) === array_keys($y), but we get a slightly more useful error message, and we don't care about order.

Test Plan

Added and ran unit tests.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/utils/utils.php
639

At some point, you just gotta throw in the towel and patch PHP to have list() and dictionary() to get some sanity back.

This revision is now accepted and ready to land.Mar 12 2019, 7:21 PM
This revision was automatically updated to reflect the committed changes.