-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ArrayCollection#filter()
to filter by key and also value
#167
Conversation
Uses ARRAY_FILTER_USE_BOTH in the underlying array_filter function. Does not cause BC Break
}); | ||
self::assertEquals([0 => 1, 2 => 3], $res->toArray()); | ||
self::assertEquals([0 => 1, 2 => 3, 4 => 5], $res->toArray()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do add a test: don't modify existing tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
Also to be checked: preservation of order, preservation of key and value types (use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
ArrayCollection#filter()
to filter by key and also value
Thanks @0x13A! |
cheers |
Uses ARRAY_FILTER_USE_BOTH in the underlying array_filter function. Does
not cause BC Break.
Any examples where how to run benchmarks against this?
#165