NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #64 most downloaded on Packagist
A PHP library for representing and manipulating collections.
Latest stable
2.1.1
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 2.6 years
Nearly every release is documented
notes for 18 of 18 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
18 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Correct the type annotation on CollectionInterface::column() to indicate the array it returns is list<mixed>
CollectionInterface::column() to indicate the array it returns is list<mixed> (#130)Add support for retrieving properties on collection items that are accessible via magic methods __get and __isset
__get and __isset (#126)list<T> instead of array<int, mixed> for CollectionInterface::column() (#124)ValueExtractorTrait expects getType(): string to exist on the using class, but it did not declare an abstract to force this requirement; now it does, and any classes using this trait must implement getType(): stringcontains() twice when using AbstractSet::add(), significantly improving performance for very large collections (#68)Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add support for CollectionInterface::reduce()
CollectionInterface::reduce() (#87)CollectionException interfaceSort enumcolumn(), sort(), and where() on non-object collection typesCollectionInterface::sort() now uses the new Sort enum instead of a stringArrayInterface no longer extends \Serializable, and the serialize() and unserialize() methods have been removed from AbstractArray; however, AbstractArray still supports serialization through implementing __serialize() and __unserialize()Make type aliases compatible in diff, intersect, and merge
Merging of sets now excludes duplicates, since a set does not allow duplicate values.
Standardize template annotations and fix iterable types
Minimum PHP version supported is 7.3
Fixed incorrect callable type annotation on CollectionInterface::map() .
CollectionInterface::map().Fixed incorrect callable type annotation on CollectionInterface::map() .
CollectionInterface::map().Fixed Psalm annotations causing Psalm errors in downstream projects.
AbstractCollection::column() attempting to access a property or method on a non-object.Fixed broken AbstractCollection::map() implementation.
AbstractCollection::map() implementation.Removed warning about deprecated dependency when running composer install
AbstractCollection::diff(), AbstractCollection::intersect() and
AbstractCollection::merge() when used with Generic collections.AbstractCollection::diff() and AbstractCollection::intersect()
returning inconsistent results when used on collections containing objects.composer installFixed AbstractCollection::offsetSet() so that it uses the provided $offset when setting $value in the array.
AbstractCollection::offsetSet() so that it uses the provided $offset when setting $value in the array.Added support for *queue* data structures to represent collections of ordered entities. Together with *double-ended queues* (a.k.a. *deques*), first-i
QueueInterface and DoubleEndedQueueInterface and classes Queue and DoubleEndedQueue.AbstractSet and Set.TypedMapInterface and the classes AbstractTypedMap and TypedMap.column(), first(), last(), sort(), filter(), where(), map(), diff(), intersect(), and merge(). See CollectionInterface for more information.CollectionMismatchException, InvalidArgumentException, InvalidSortOrderException, NoSuchElementException, OutOfBoundsException, UnsupportedOperationException, and ValueExtractionException.AbstractArray::unserialize() (see #47).BREAKING: Remove getType() and constructor from AbstractCollection. Children must now implement getType(), which should return a string value naming t
getType() and constructor from AbstractCollection. Children must now implement getType(), which should return a string value naming the data type of items for the collection.MapInterface::keys() method to return the keys from a MapInterface object. Also added to the AbstractMap class.MapInterface::keys() method to return the keys from a MapInterface
object. This was added to the AbstractMap class.getType() and constructor methods from AbstractCollection. Children
of AbstractCollection must now implement getType(), which should return a
string value that defines the data type of items for the collection.Collection and NamedParameterMap
items fail type checks.Allow for non-strict checking of values in typed collections
Add support for typed collections
Support generic arrays and maps.
One column per quarter.