NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #4012 most downloaded on Packagist
A (memory) friendly, easy, lazy and modular collection class.
Latest stable
7.6.1
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 12 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
104 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Fix Random operation. `47b2f55`
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Replace Only with IntersectKeys operation. `78a20a3`
8 September 2020
78a20a36401f74c78813b
95f8856c253472841a7c53ec344d8ae26f6c25347278a20a3841a7c53dbf9496401f7495f8856c78813bRename Skip into Drop. `0c6b01a`
Rename Skip into Drop. 0c6b01a
Update Last operation. 4ae3d35
Update First operation. 79a1f5c
cad956fc9e6701cf816a3ed246ed24fa777deb825d9d1e1761b9ca3cf20942c5a392f3cad956fc9e67010c6b01acf816a3deb825d4ae3d3579a1f5cf20942ced246ed24fa777ce835609d1e1761bb45f21b9ca3cUpdate Map operation. `1521b23`
Refactor reducer callbacks. `8f83368`
Add Unfold operation. `58eeaa0`
58eeaa02189649Update Skip operation. `8f668d7`
Add forgotten interface links. `be3f405`
This release is a complete refactoring of how the Collection handle the operations and transformations classes.
This release is a complete refactoring of how the Collection handle the operations and transformations classes.
First of all, there are no more Transformations, they are all converted to Operations. This is a huge change, everything is much simpler internally.
Then, Operations are now Function objects. They are also stateless and immutable.
Implementing a custom Operation is basically implementing the __invoke() method.
The __invoke() method returns one or more unary Closure at a time and the last Closure must take the Iterator argument.
Compare the Compact operation in version 2.2.0 and 2.3.0.
Run and Transform operations are also gone, now that an Operation is a function object, a new Operation Compose is available and replaces them.
All those changes should also improve overall performances, even though no benchmarks were made so far.
#18#18cddf0b8961f5b6cb84521f115d1d126994fa7c1ff3e36b03cf40dc3b6ce8ecfAdd IfThenElse operation. `f9c0c04`
28 August 2020
6869e40f9c0c0454a3e97412734c#1901155c26c3b94f2d7ce6e#19f5ceeb86fce39807c1c121260974b0718235f4d134afbcac3a5388d2fc5baa6457842285db3411702597810bff8#197daf2096869e40efccd8801155c2f9c0c04f5ceeb86fce39818a788507c1c1212609748e25055b0718235f4d134afbcac3a5388d2fc5baa66c3b94f7e156944578422d5207e385db3411702597810bff854a3e97412734c2d7ce6eConvert First transformation into operation.
Those operation now returns a collection instead of a single item.
def5f261d156575a7e41dc7ac8b3a8cb98f126bf8aa05ec2f8b1dd276496559f81494aa8dac3384e6381d1be59ee716b8581b7a6f119cdfe1c9e929cece391ddde5ccUpdate Contains transformation, make it variadic.
Simplify the use of the Sort callback in userland.
5014004Add new Github workflows, from ergebnis/php-library-template
Update Sort operation and remove the SortableIterableIterator.
Add Associate operation. (f76a0a5)
Update Sort operation and remove the SortableIterableIterator. (d0c7f2f)
Add example with random number distribution. (f49c1ca) Update and fix Psalm phpdoc. (91c8900)
# New stuff * Add Unpair operation. (a94f3ee5910ada4888deb98707c5b04d30ad6d96) * Add Pair operation. (cd373c5277fdfcd27dc99b1915ca1c837d2bdd8c) # Impr
Feat improve static analysis score. `#8`
#869e96835c5c0d1ca6e895f488268b3a39a3e095c55825b7da0e1489ae5b6acd1bab2c7f87758e32bb7bfcd12c3b09e1f63a716ced8e3d262e1e25cf47235452fda1695c690497699f1bc71549c8b94f6de65ddb895298d67c5ee8fe20bd8e377b214837472863762eb5a5a1bd106fbfe3bc20061cac685b65cffe2a41c7d7d5282d29de649Bump actions/checkout from v1 to v2.3.1 `#7`
87d8762a715506ced44cc51c540277332529970d388930335Pass the $collection object by default to the static function returned by the Operation object. Rename Operation::on() in Operation::__invoke().
#467a000798b2495be98389e88562a74b621c980ebc55247ce584c629c795aa0672202db64a64a45a727ae975e73274232f7a9b6c9abaa9caffe0d79b3721100fe32346d91a49a20e3573597122c615189f0bd0e429b77e0e02dd5be44c566fe0d5e27010065145895762531f66e68c32593e7be8325319603400a72ffb151742d74f8c0b06d68578ddc3b420c4da37bc12a6bb692f8c20449885715891b85b2a3a7039c803df730581a70029df0e2c980f722dde7d49c6e981dbdf85420cdd94a3bacbaddd632670e4bf27522d2ae97431348d36339aaf643c5c9aa01b7ffef09affab6c0070b45f87d6fc9cc7798ca0b0b707f058fb21631ac31335f70fb09d402e2deacf8dd15159694c1b3f9117af0b296060921f12eb9b25c0cf35c58cb5c1f2487b71cbc95a87ca4b7d288db761a6978323eff1f70218d20d7dfb52f366d47f257cedbc550819bbe33b497376353a323774b261a8988fd00fa0352ae82faa39a780687caf5a37bbbb99c94691b8633b10afc6274268cd85bdbddf8fd3972332c02bf36f45767Let the callback return arrays with non numerical keys. `77d111f`
Fix the behavior of the ::apply() operation. `719eea8`
Fix behavior of ::filter() operation. `bc2d733`
bc2d733Increase default Grumphp timeout to avoid useless failures in CI. `03a53fa`
03a53fa06c5f6259b6fa87737e07f57c286ff360a6675f4abAdd new methods: ::combinate() and ::permutate(). `c55a2ef`
Add Product operation to compute the cartesian product. `1940b16`
Transfer repository to https://github.com/loophp `92551d7`
92551d74326a628964acc96decd5940beb4e9994652aee709d9a6b04d597a13dc64469Remove unneeded ArrayIterators and use simple arrays. `01d5ae2`
01d5ae297769de9fe3d5ab3b3eedbc48ab2cba479eb7853d9Fix nasty bug in the ClosureIterator that prevent the Iterator to be rewinded properly, giving inconsistency results.
Fix nasty bug in the ClosureIterator that prevent the Iterator to be rewinded properly, giving inconsistency results.
Switch from Travis CI to Github Actions.
bae14bfa80afcd83a8a2e3fe27051841f7f1d4ef3cc1df8d307f485973ece19d484b1cac6fd27Cast array keys as string by default in Flip operation. `905d3fb`
905d3fb### Commits - Update code style. `eb98244` - Rename minor stuff. `ec8ee0e`
Update README example. `03c7f87`
Add the Until operation with tests and example in README. `4c73fe4`
Minor cosmetic update. `ae0e00b`
55f7c56ae0e00be21e84fb2007beca60af0b8a75569e96a94994772c23519882e0dc1a6d8014b3546cfa3e5971972dd93716166ea898a3b1e677738Update the Chunk operation. `d61bac3`
Update README wording. `ccaa796`
ccaa796724c166a69e246a7497654ad72c2faa01127057e09b3e0d19Remove useless BaseCollection. `c8aca3c`
c8aca3cda1ab80711611b37ad7bd64f38081e3b34b4eb5c88### Commits - Refactoring. `5b2a0cf`
5b2a0cfMinor update on Collection class. `a543106`
a5431068cfd4eb38d8f710add9fc8db4ccfc59054f2d2b6d9913aa8cd8e0c79af9e6a8Add return type to Closures. `a2b9366`
Minor code updates and increase code coverage. `89aa7a1`
Use ::with() method everywhere. `748a618`
831850e748a618534f374d658c492bb704b2ef23421bb26c20d7e8494bba092a9127d8660f8ad8b9c53bd50b257ad60162b78b672Update composer.json. `c9aff7b`
c9aff7bd645d477677b5d6659473d95b896e73924aa1143c783a4e4d### Commits - Initial commit. `7247de4`
7247de4One column per quarter.