Skip to content

Commit 63d83ee

Browse files
committed
docs: add changelog for new features
1 parent 52ced3c commit 63d83ee

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [1.4.1](https://github.com/geekcell/php-ddd/compare/v1.4.0...v1.4.1) (2024-01-05)
4+
5+
### Features
6+
7+
Added a couple of functions to the [Collection](./src/Domain/Collection.php) class to enable a smoother developer experience when trying use it in a more functional style
8+
9+
The following functions were added:
10+
* `fromIterable` - enables users of the collection to construction the collection from an iterable value like iterators, generators, etc.
11+
* `every` - Function that returns true if given callback returns truthy values for all items
12+
* `none` - Function that returns true if given callback returns falsy values for all items
13+
* `some` - Function that returns true if given callback returns truthy values on some items
14+
* `first` - Get the first element of the collection that matches a callback, if given. Throws exception if collection is empty or predicate is never satisfied
15+
* `firstOr` - Same as first but returns $fallbackValue if collection is empty or predicate is never satisfied
16+
* `last` - Get the last element of the collection that matches a callback, if given. Throws exception if collection is empty or predicate is never satisfied
17+
* `lastOr` - Same as last but returns $fallbackValue if collection is empty or predicate is never satisfied
18+
319
## [1.4.0](https://github.com/geekcell/php-ddd/compare/v1.3.1...v1.4.0) (2023-12-19)
420

521

0 commit comments

Comments
 (0)