Skip to content

Releases: cloudcreativity/php-ddd-modules

v6.0.1

13 Jun 14:06
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

What's Changed

  • build: add permissions to gh actions by @lindyhopchris in #37
  • Placed the CommandQueuer interface in the Messaging namespace. As it simply represents a way of sending a message in a non-blocking way, it should have been in the messaging namespace. The previous interface (in the Bus namespace) is kept for backwards-compatibility. It now extends the correct interface and is marked as deprecated.

Full Changelog: v6.0.0...v6.0.1

v6.0.0

08 May 15:23

Choose a tag to compare

What's Changed

  • Refactor: move bus to its own namespace so it can be used by application and infrastructure layers by @lindyhopchris in #32
  • feat: make min php version 8.4 and update style rules by @lindyhopchris in #34
  • refactor: enforce final and make extendable classes abstract by @lindyhopchris in #35
  • docs: update docs for v6 by @lindyhopchris in #36

Full Changelog: v5.2.0...v6.0.0

v5.2.0

05 Jan 13:33

Choose a tag to compare

What's Changed

  • New domain event dispatcher features:
    • Can now use a PSR container for the domain event dispatcher to resolve both handlers and middleware. Inject the service container via the first constructor argument. This works for all three domain event dispatchers.
    • Domain events can now be mapped to handlers on a domain event dispatcher class via the ListonTo attribute.
    • Middleware can now be added to a domain event dispatcher via the Through attribute.
  • The unit of work domain event dispatcher will now log debug messages when deferring and executing listeners. To enable this, inject an optional logger instance via the constructor.

Full Changelog: v5.1.0...v5.2.0

v5.1.0

01 Jan 20:12

Choose a tag to compare

What's Changed

  • Feature: support PSR container in all specific container classes and add auto-wiring by @lindyhopchris in #31
  • Feature: add UUID v4 and v7 specific identifier classes.

Full Changelog: v5.0.0...v5.1.0

v5.0.0

09 Dec 13:59

Choose a tag to compare

What's Changed

Full Changelog: v4.1.0...v5.0.0

v5.0.0-rc.4

29 Oct 15:48

Choose a tag to compare

v5.0.0-rc.4 Pre-release
Pre-release

What's Changed

Added

  • The following fake classes now all implement array access to access captured items by index, plus can now be iterated over:
    • Testing\FakeDomainEventDispatcher
    • Testing\FakeExceptionReporter
    • Testing\FakeOutboundEventPublisher
    • Testing\FakeQueue

Full Changelog: v5.0.0-rc.3...v5.0.0-rc.4

v5.0.0-rc.3

14 Oct 13:00

Choose a tag to compare

v5.0.0-rc.3 Pre-release
Pre-release

What's Changed

Added

  • BREAKING Command and query validators can now return early on the first validation failure, by marking the validator with the stopOnFirstFailure() method. This is technically a breaking change as the method was added to the validator interface; however, if you are using the Validator class provided by this package, it now implements this method.
  • Middleware that extend ValidateCommand and ValidateQuery can mark themselves as stopping on the first failure by implementing the Bail interface, or overloading the stopOnFirstFailure() method to return true.

Full Changelog: v5.0.0-rc.2...v5.0.0-rc.3

v5.0.0-rc.2

14 Oct 06:48

Choose a tag to compare

v5.0.0-rc.2 Pre-release
Pre-release

What's Changed

Added

  • Added a static tryFrom() method to the IntegerId, StringId and Uuid identifier classes. This method returns null if the value provided cannot be cast to the identifier type.
  • The static from() method on all the identifier classes now accepts null but throws in this scenario. This allows it to be used where the value you are casting is possibly null.
  • New methods on the ListOfErrors interface:
    • find() to find the first matching error.
    • sole() to get the first error, but only if exactly one error exists.
    • any() to determine if any of the errors match.
    • every() to determine if every error matches.
    • filter() to get a new list containing only matching errors.
  • The FailedResultException now has a message when the result has an error code but no error message.
  • The FakeExceptionReporter now has none() and expect() helper methods, to prevent exceptions from being swallowed in tests.
  • BREAKING: Changes to the result interface to support the following features. Although technically breaking, this will not affect the majority of implementations are the concrete result class provided by this package has been updated.
    • Can now pass a default value to the Result::error() method. This default value can either be a string or a closure that receives the error code. (Errors always have codes if they do not have messages.)
    • Added Result::code() method to get the first error code in the result's errors.

Deprecated

  • The ListOfErrors::contains() method is deprecated and will be removed in 6.0. Use the new any() method instead.
  • Calling the ListOfErrors::first() method with arguments is deprecated and will be removed in 6.0. Use the new find() method instead.

Full Changelog: v5.0.0-rc.1...v5.0.0-rc.2

v5.0.0-rc.1

14 Oct 06:46

Choose a tag to compare

v5.0.0-rc.1 Pre-release
Pre-release

What's Changed

Added

  • BREAKING: The Identifier interface now has an any() method that returns true if any of the given identifiers match the identifier. If you have implemented any custom identifiers, you can add the IsIdentifier trait to implement this new method.
  • BREAKING: Add message() and messages() helper methods to the ErrorList interface. Although technically breaking, this will not affect most implementations as the concrete error list class provided this package has been updated.

Full Changelog: v4.1.0...v5.0.0-rc.1

v4.1.0

03 Oct 12:55

Choose a tag to compare

What's Changed

Added

  • Log context for objects that have date time properties will now convert those properties to strings.
  • Log context for objects that have date time zones will now convert the time zone to its name.

Full Changelog: v4.0.0...v4.1.0