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
Feature: random in Toolkit\A
and Toolkit\Collection
#4270
Feature: random in Toolkit\A
and Toolkit\Collection
#4270
Conversation
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.
💛
@lukasbestle this was quite light on the comments, Lukas 😄 I'll look at the changes later. |
Co-authored-by: Lukas Bestle <lukas@getkirby.com>
Co-authored-by: Lukas Bestle <lukas@getkirby.com>
Co-authored-by: Lukas Bestle <lukas@getkirby.com>
@lukasbestle you were right, updated. Are we still in the window for 3.6.5? |
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.
👍
3.6.5 is already nearing release, but we can include this PR in 3.6.6, which is planned to be released in two weeks.
🤝 |
This PR …
Features
New
A::random()
and$collection->random()
methods to get one or multiple random items from arrays and collections, optionally shuffled. Unless shuffled, the overall order of the returned items is kept.Breaking changes
None
Ready?
For review team
@distantnative said he doesn't hate me yet