Page MenuHomePhabricator

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

Authored by epriestley on Mar 11 2019, 4:44 AM.
Tags
None
Referenced Files
F19051245: D20268.id48383.diff
Nov 28 2025, 12:09 AM
F19022970: D20268.id.diff
Nov 23 2025, 10:42 PM
F19012967: D20268.diff
Nov 22 2025, 2:24 PM
F18891636: D20268.diff
Nov 7 2025, 10:51 AM
F18814149: D20268.diff
Oct 20 2025, 9:52 PM
F18805880: D20268.diff
Oct 18 2025, 4:54 PM
F18803401: D20268.id.diff
Oct 17 2025, 11:24 PM
F18791450: D20268.diff
Oct 16 2025, 1:35 PM
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.