From dc1b684978476aa4403c80534081340c8d22527c Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Tue, 27 Oct 2026 23:13:07 +0100 Subject: [PATCH] release 1.0.0 --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..10d4a34 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +## 1.0.0 + +### Breaking + +- PHP 8.2 or newer is required. +- Contributors need PHPUnit 11 to run the test suite. + +### Added + +- `compile()` and `Compilable`: partials, curried and fixed functions, pipes and predicates flatten into plain closures once, so hot loops don't go through their `__invoke()`. Compiled internal functions drop extra arguments. +- Collections in `Kadet\Functional\Collections`: transforms (map, filter and friends), queries, and collectors with grouping. The transforms also come lazy, returning generators, in `Kadet\Functional\Collections\Lazy`; queries and collectors accept lazy input and end a lazy chain. +- Collection callbacks get `($value, $key)`, except internal functions and callables declaring one parameter, which get only the value. Wrappers (`partial()`, `memoize()`, predicates, `pipe()`) are seen through to the function they call. +- `php-ds` is suggested for the collections. `DsUnavailableException` is thrown when it is needed but not installed. +- `EmptyCollectionException` is thrown by queries that need an element when the collection has none (or none matching). +- Docblock types and generics, so static analysis understands collection contents. + +### Fixed + +- `not()` and `Predicate::not()` predicates return the negated predicate from `getDecorated()` instead of null. +- `closure()` and `ref()` accept static method callables like `[Foo::class, 'method']`.