Releases: loophp/collection
2.3.3
2.3.2
2.3.1
2.3.0
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
2.2.0
28 August 2020
New
- Add Changelog.md.
6869e40
- Add IfThenElse operation.
f9c0c04
- Add Unpack operation.
54a3e97
- Add Pack operation.
412734c
Possible breaking changes
- Update Group operation. (Fix #19)
#19
- Update Iterate constructor.
01155c2
- Update Split operation.
6c3b94f
- Update Unpair operation.
2d7ce6e
Improvements
- Update Group operation. (Fix #19)
#19
- Update Flatten operation.
f5ceeb8
- Update Group operation.
6fce398
- Update Runable interface
07c1c12
- Update Chunk operation
1260974
- Update Column operation
b071823
- Update Filter operation
5f4d134
- Update Cache operation
afbcac3
- Update Cycle operation
a5388d2
- Update Slice operation
fc5baa6
- Update Limit operation.
4578422
- Update Scale operation.
85db341
- Update Map operation.
1702597
- Update operations to use Pack instead of Wrap.
810bff8
Miscellaneous
2.1.0
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
2.0.4
2.0.3
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.