This repository was archived by the owner on Jul 28, 2023. It is now read-only.
Releases: spaceonfire/collection
Releases · spaceonfire/collection
2.1.1
2.1.0
2.0.1
New major version
Added
- Make collection interface stricter
- Added abstract decorator
- Added
IndexedCollectiondecorator TypedCollectionnow acts as decorator
Deprecated
TypedCollectionnow final. Extend it with a decorator.
Removed
BaseCollectionhas been removed. Use decorators if you need to add new functionality to collections.
Update typed collection
Added
- Use
spaceonfire/typefor checking typed collection items type
Fixed
- Fix division by zero when calling average() on empty collection
Implement FilterableInterface from spaceonfire/criteria by collection
Added
- Update
CollectionInterface:- update method signatures according to
BaseCollection - update phpDoc comments
- update method signatures according to
- Replace Closure with callable type
- Move collection aliases to trait
- Implement
FilterableInterfacefromspaceonfire/criteriaby collection
Fixed
- Fixed
ArrayHelper::unflatten()method.
New methods added to collection
- New methods added:
CollectionInterface::unique()CollectionInterface::implode()CollectionInterface::first()CollectionInterface::last()CollectionInterface::firstKey()CollectionInterface::lastKey()CollectionInterface::average()CollectionInterface::median()
- Method aliases adde:
BaseCollection::avg()alias toBaseCollection::average()BaseCollection::join()alias toBaseCollection::implode()
See #9 for more
Declare `CollectionInterface::merge` attributes
Merge pull request #8 from spaceonfire/7-merge-attributes Declare `CollectionInterface::merge` attributes
Fix BaseCollection::filter call with empty callback
1.2.1 Fix BaseCollection::filter call with empty callback
Huge update for TypedCollection
- check type on item add to collection
- add
downgrademethod that returns simpleCollectioninstance - override some methods witch logic requires downgrade, restore original
TypedCollectionwhen we can - cover
BaseCollectionandTypedCollectionwith tests
See #4 for changes