Releases: tiny-blocks/collection
Releases · tiny-blocks/collection
v2.3.0
- Added
Internal\Materializationand refactoredEagerPipelineto rely on it for cached terminal access. - Expanded/adjusted complexity and evaluation-strategy documentation (
Collectible,Pipeline, README). - Added test coverage for multi-predicate filtering and reducing over chained operations (eager + lazy).
v2.2.0
- Introduce
Collection::createFromClosure()backed by an eager pipeline that materializes the closure result immediately. - Move
first/isEmpty/lastresolution intoPipelineimplementations (eager/lazy) and remove the old resolving helpers. - Expand README + API docs with evaluation strategy and complexity explanations; add extensive tests and new test models.
v2.1.0
- Introduces
Collection::createLazyFromClosure()backed byLazyPipeline::fromClosure()for re-iterable lazy sources. - Refactors
EagerPipelineto memoize materialization and allow repeated iteration when created from single-use iterables (e.g., generators). - Updates
each()to be a terminal operation returningvoid, and updates tests + adds new tests for closure/generator reiteration.
v2.0.0
- Introduces
Pipeline+EagerPipeline/LazyPipelineand refactorsCollectionto compose operations via pipeline stages. - Replaces the previous operation set (
LazyOperation/ImmediateOperation) withTransforming\*(pipeline stages) andResolving\*(terminal helpers). - Consolidates/rewrites tests and updates documentation to reflect the new API and extension patterns.
v1.16.0
- Introduces
Collectible::merge()and implements it inCollection. - Adds a new lazy write operation
Internal\Operations\Write\Merge. - Adds unit tests and README documentation for merging collections.
v1.15.0
- Updates dependencies and remove unused extensions in CI configuration.
v1.14.0
- Move operation test files to new structure under
Internal\Operations\. - Update namespaces in test files to reflect new structure.
- Refactor
Slice.phpbuffered slicing to useSplQueuefor efficiency and clarity. - Enhance docblocks in
Collectible.phpwith complexity notes and clarifygroupByreturn type.
v1.13.1
- Fixes descending sort to always reverse predicate arguments, ensuring correct order.
- Adds unit test for sorting collection in descending order using a custom predicate.
- Updates README formatting for consistency.
- Refactors
joinTomethod for improved separator handling.
v1.13.0
- Remove redundant
array_first/array_lastusage inFirst.phpandLast.phpoperations. - Move test classes to
Test\TinyBlocks\Collectionnamespaces for consistency. - Update autoload-dev PSR-4 mapping in composer.json.
- Bump tiny-blocks/mapper to 1.4.* and add tiny-blocks/currency to require-dev.
- Update Makefile test-file usage instructions.
- Adjust imports in test files to reflect namespace changes.
v1.12.0
- Bump PHP requirement to 8.5 and update dependencies in composer.json and Docker image.
- Refactor all closures to use static where possible for performance and clarity.
- Optimize Filter, First, Last, and Find operations for better lazy evaluation and early termination.
- Enhance Slice to handle negative lengths and improve memory efficiency.
- Update CI workflow for artifact-based dependency caching and PHP 8.5.
- Improve Makefile with help target, colorized output, and updated Docker image.
- Remove unused phpmd references and update .gitattributes.
- Update documentation and tests to reflect static closures and new behaviors.