Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Releases: spaceonfire/collection

2.1.1

16 Feb 17:34
Compare
Choose a tag to compare

Added

  • Support installation on PHP 8

2.1.0

13 Oct 18:04
Compare
Choose a tag to compare

Added

  • Update spaceonfire/type library up to ^1.2. Replace deprecated static TypeFactory call in TypedCollection.

2.0.1

26 Sep 18:12
Compare
Choose a tag to compare

Fixed

  • Development config updates
  • Minor type issues fixes found by static analyser

New major version

04 Jun 15:39
Compare
Choose a tag to compare

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

01 Jun 16:38
a3fe34f
Compare
Choose a tag to compare

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

31 May 16:10
55d9cd9
Compare
Choose a tag to compare

Added

  • Update CollectionInterface:
    • update method signatures according to BaseCollection
    • update phpDoc comments
  • Replace Closure with callable type
  • Move collection aliases to trait
  • Implement FilterableInterface from spaceonfire/criteria by collection

Fixed

  • Fixed ArrayHelper::unflatten() method.

New methods added to collection

07 Mar 19:40
1c6f3ba
Compare
Choose a tag to compare
  • 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 to BaseCollection::average()
    • BaseCollection::join() alias to BaseCollection::implode()

See #9 for more

Declare `CollectionInterface::merge` attributes

07 Mar 17:24
7baacf1
Compare
Choose a tag to compare
Merge pull request #8 from spaceonfire/7-merge-attributes

Declare `CollectionInterface::merge` attributes

Fix BaseCollection::filter call with empty callback

09 Nov 19:15
4c35910
Compare
Choose a tag to compare
1.2.1

Fix BaseCollection::filter call with empty callback

Huge update for TypedCollection

07 Nov 20:39
3941c2e
Compare
Choose a tag to compare
  • check type on item add to collection
  • add downgrade method that returns simple Collection instance
  • override some methods witch logic requires downgrade, restore original TypedCollection when we can
  • cover BaseCollection and TypedCollection with tests

See #4 for changes