Skip to content

Releases: loophp/collection

2.3.1

30 Aug 20:48
Compare
Choose a tag to compare

2.3.1

30 August 2020

2.3.0

30 Aug 17:44
Compare
Choose a tag to compare

This release is a complete refactoring of how the Collection handle the operations and transformations classes.

First of all, there are no more Transformations, they are all converted to Operations. This is a huge change, everything is much simpler internally.
Then, Operations are now Function objects. They are also stateless and immutable.
Implementing a custom Operation is basically implementing the __invoke() method.
The __invoke() method returns one or more unary Closure at a time and the last Closure must take the Iterator argument.

Compare the Compact operation in version 2.2.0 and 2.3.0.

Run and Transform operations are also gone, now that an Operation is a function object, a new Operation Compose is available and replaces them.

All those changes should also improve overall performances, even though no benchmarks were made so far.

New

  • Convert operations and transformations to function objects #18
  • Run and Transform operation are gone

Miscellaneous

2.2.0

28 Aug 19:45
Compare
Choose a tag to compare

2.2.0

28 August 2020

New

Possible breaking changes

  • Update Group operation. (Fix #19) #19
  • Update Iterate constructor. 01155c2
  • Update Split operation. 6c3b94f
  • Update Unpair operation. 2d7ce6e

Improvements

Miscellaneous

2.1.0

22 Aug 18:58
Compare
Choose a tag to compare

Possible breaking changes

  • Convert First transformation into operation. (c7ac8b3)
  • Convert Last transformation into operation. (a8cb98f)

Those operation now returns a collection instead of a single item.

New

  • Convert First transformation into operation. (c7ac8b3)
  • Convert Last transformation into operation. (a8cb98f)
  • Add Head operation. (126bf8a)
  • Delete obsolete Walk operation in favor of Map operation. (a8dac33)

Improvements

  • Update Filter operation. (5a7e41d)
  • Update Tail operation. (1d15657)
  • Update Filter operation. (f81494a)
  • Update Map operation. (8b1dd27)
  • Update Split operation. (84e6381)
  • Update Implode transformation. (1c9e929)
  • Update FoldLeft/FoldRight transformations. (cece391)

Miscellaneous

2.0.5

12 Aug 12:35
Compare
Choose a tag to compare

New

  • Update Contains transformation, make it variadic. (b78a704)

Improvements

  • Various minor changes and optimizations. (6e09157)

Miscellaneous

  • Bump actions/checkout from v2.3.1 to v2.3.2

2.0.4

08 Aug 06:55
Compare
Choose a tag to compare

Improvements

  • Simplify the use of the Sort callback in userland. (5014004)

2.0.3

07 Aug 15:58
Compare
Choose a tag to compare

New

  • Add new Github workflows, from ergebnis/php-library-template
  • Add docker stack for building documentation locally.

Improvements

  • Use parameters of Closure Iterator.
  • Update documentation.

2.0.2

05 Aug 20:22
Compare
Choose a tag to compare

New

Add Associate operation. (f76a0a5)

Improvements

Update Sort operation and remove the SortableIterableIterator. (d0c7f2f)

Documentation

Add example with random number distribution. (f49c1ca)
Update and fix Psalm phpdoc. (91c8900)

2.0.1

04 Aug 17:17
Compare
Choose a tag to compare

New stuff

Improvements

  • Use a CacheIterator iterator. (1dcd9eb)

2.0.0

03 Aug 08:10
Compare
Choose a tag to compare
Update README.