@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file. This projec
55
66## Unreleased
77
8+ ## [ 5.0.0-rc.2] - 2025-10-14
9+
10+ ### Added
11+
12+ - Added a static ` tryFrom() ` method to the ` IntegerId ` , ` StringId ` and ` Uuid ` identifier classes. This method
13+ returns ` null ` if the value provided cannot be cast to the identifier type.
14+ - The static ` from() ` method on all the identifier classes now accepts ` null ` but throws in this scenario. This allows
15+ it to be used where the value you are casting is possibly null.
16+ - New methods on the ` ListOfErrors ` interface:
17+ - ` find() ` to find the first matching error.
18+ - ` sole() ` to get the first error, but only if exactly one error exists.
19+ - ` any() ` to determine if any of the errors match.
20+ - ` every() ` to determine if every error matches.
21+ - ` filter() ` to get a new list containing only matching errors.
22+ - The ` FailedResultException ` now has a message when the result has an error code but no error message.
23+ - The ` FakeExceptionReporter ` now has ` none() ` and ` expect() ` helper methods, to prevent exceptions from being swallowed
24+ in tests.
25+ - ** BREAKING** : Changes to the result interface to support the following features. Although technically breaking, this
26+ will not affect the majority of implementations are the concrete result class provided by this package has been
27+ updated.
28+ - Can now pass a default value to the ` Result::error() ` method. This default value can either be a string or a
29+ closure that receives the error code. (Errors always have codes if they do not have messages.)
30+ - Added ` Result::code() ` method to get the first error code in the result's errors.
31+
32+ ### Deprecated
33+
34+ - The ` ListOfErrors::contains() ` method is deprecated and will be removed in 6.0. Use the new ` any() ` method instead.
35+ - Calling the ` ListOfErrors::first() ` method with arguments is deprecated and will be removed in 6.0. Use the new
36+ ` find() ` method instead.
37+
838## [ 5.0.0-rc.1] - 2025-10-09
939
1040### Added
@@ -500,6 +530,8 @@ All notable changes to this project will be documented in this file. This projec
500530
501531Initial release.
502532
533+ [ 5.0.0-rc.2 ] : https://github.com/cloudcreativity/ddd-modules/compare/v5.0.0-rc.1...v5.0.0-rc.2
534+
503535[ 5.0.0-rc.1 ] : https://github.com/cloudcreativity/ddd-modules/compare/v4.1.0...v5.0.0-rc.1
504536
505537[ 4.1.0 ] : https://github.com/cloudcreativity/ddd-modules/compare/v4.0.0...v4.1.0
0 commit comments