Page MenuHomePhabricator

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

Authored by epriestley on Mar 11 2019, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 3:12 AM
Unknown Object (File)
Wed, Apr 24, 4:03 PM
Unknown Object (File)
Sun, Apr 21, 5:06 PM
Unknown Object (File)
Fri, Apr 19, 3:03 AM
Unknown Object (File)
Thu, Apr 18, 11:26 PM
Unknown Object (File)
Sat, Apr 13, 4:20 AM
Unknown Object (File)
Tue, Apr 9, 1:21 AM
Unknown Object (File)
Tue, Apr 2, 10:18 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
Branch
same1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22246
Build 30417: Run Core Tests
Build 30416: arc lint + arc unit

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.