This repository has been 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
IndexedCollection
decorator TypedCollection
now acts as decorator
Deprecated
TypedCollection
now final. Extend it with a decorator.
Removed
BaseCollection
has been removed. Use decorators if you need to add new functionality to collections.
Update typed collection
Added
- Use
spaceonfire/type
for 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
FilterableInterface
fromspaceonfire/criteria
by 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
downgrade
method that returns simpleCollection
instance - override some methods witch logic requires downgrade, restore original
TypedCollection
when we can - cover
BaseCollection
andTypedCollection
with tests
See #4 for changes