ramsey/collection
ramsey/collection is a PHP library for representing and manipulating typed collections. Provides data structures and APIs inspired by the Java Collections Framework, helping you store, validate, and work with groups of objects and values consistently.
CollectionInterface::column() to indicate the array it returns is list<mixed> (#130)__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)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()CollectionInterface::map().CollectionInterface::map().AbstractCollection::column() attempting to access a property or method on a non-object.AbstractCollection::map() implementation.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 installAbstractCollection::offsetSet() so that it uses the provided $offset when setting $value in the array.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).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.How can I help you explore Laravel packages today?