Releases: cloudcreativity/php-ddd-modules
Releases · cloudcreativity/php-ddd-modules
v3.3.1
What's Changed
Fixed
- Ensure that the
Resultclass uses@template-covariantfor its result value. This now matches the result interface, which already used template covariant.
Full Changelog: v3.3.0...v3.3.1
v3.3.0
What's Changed
- Feature: enum helpers and improvements by @lindyhopchris in #22
- New
enum_valueandenum_stringhelper functions for getting a scalar or string value from an enum. - The
Guid::fromUuid()method now also accepts aUuidobject, so that it can be used to create a GUID from a UUID identifier. Previously it required a Ramsey UUID object.
Full Changelog: v3.2.0...v3.3.0
v3.2.0
What's Changed
- New
ApplicationExceptionfor errors originating from the application layer. - Can now pass a closure to the
Contracts::assert()method for the message. The closure is only invoked if the precondition fails. - Fix: allow is entity trait to be used on readonly class as intended by @lindyhopchris in #21
Full Changelog: v3.1.0...v3.2.0
v3.1.0
Changelog
Added
- Can now provide an enum as the type of the GUID identifier.
- Can now provide multiple types when checking if a GUID is of a type - the
Guid::isType()method. It returnstrueif any of the provided types match the type of the GUID. - The
LazyListOfGuidsiterator now has anonly()method. This can be provided a list of types, and the iterator will yield only GUIDs with a matching type.
Full Changelog: v3.0.0...v3.1.0
v3.0.0
Upgrading
Refer to the Upgrade Guide here.
What's Changed
- Feature: separate out command queuing to a command queuer driving port by @lindyhopchris in #19
- Refer to the changelog for a full list of changes.
Full Changelog: v2.0.0...v3.0.0
v3.0.0-rc.2
Upgrading
composer config minimum-stability rc
composer require cloudcreativity/ddd-modules:^3.0Changelog
Added
- New test classes for driven ports and the domain event dispatcher. These are intended to make setting up unit and integration tests easier. They can also be used as fakes while you build your real implementation. The classes are in the
Testingnamespace and are:Testing\FakeDomainEventDispatcherTesting\FakeExceptionReporterTesting\FakeOutboundEventPublisherTesting\FakeQueueTesting\FakeUnitOfWork
- Properties on message classes can now be marked as sensitive so that they are not logged. This is an alternative to having to implement the
ContextProviderinterface. Mark a property as sensitive using theCloudCreativity\Modules\Toolkit\Loggable\Sensitiveattribute.
Full Changelog: v3.0.0-rc.1...v3.0.0-rc.2
v3.0.0-rc.1
Upgrading
composer config minimum-stability rc
composer require cloudcreativity/ddd-modules:^3.0What's Changed
- feat!: separate out command queuing to a command queuer driving port by @lindyhopchris in #19
- refactor!: move message interfaces to the toolkit namespace.
Full Changelog: v2.0.0...v3.0.0-rc.1
v2.0.0
Upgrading
Refer to the Upgrade Guide here.
What's Changed
- Feature: add context method to the failed result exception by @lindyhopchris in #7
- Feature: queueable commands by @lindyhopchris in #6
- Refactor: rename pipeline construct args to middleware or rules for clarity by @lindyhopchris in #8
- Refactor: tidy up event bus middleware by @lindyhopchris in #10
- Refactor: rename bus middleware interface and improve type-hint by @lindyhopchris in #9
- Feature: add abort method to result object by @lindyhopchris in #12
- Internal vs external queued work by @lindyhopchris in #11
- Refactor: rename unit of work namespace and add chapter on the unit of work pattern by @lindyhopchris in #13
- Refactor: switch to using a hexagonal architecture by @lindyhopchris in #14
- Drop interface and trait suffixes by @lindyhopchris in #15
- Build: add PHP 8.4 to automated tests by @lindyhopchris in #16
- Feature: Upgrade to PHPStan v2 and stricter rules by @lindyhopchris in #17
- Feature: More Hexagonal Architecture updates by @lindyhopchris in #18
Full Changelog: v1.2.0...v2.0.0
v2.0.0-rc.3
Upgrading
composer require "cloudcreativity/ddd-modules:^2.0.0-rc.3"Changelog
Added
- The result class now has a
Result::fail()static method to create a failed result. This is an alias of the existingResult::failed()method. - BREAKING The
Entityinterface (and therefore theAggregateinterface too) now has agetIdOrFail()method on it. Although technically breaking, if you are using theIsEntityorIsEntityWithNullableIdtraits then this method is already implemented. - New
AggregateRootinterface so that an aggregate root can be distinguished from a regular aggregate or entity.
Changed
- Remove deprecation message in PHP 8.4.
Full Changelog: v2.0.0-rc.2...v2.0.0-rc.3
v2.0.0-rc.2
Upgrading
composer require "cloudcreativity/ddd-modules:^2.0.0-rc.2"Changelog
Added
- The
Uuididentifier class now has agetBytes()method - Can now get a nil UUID from the
Uuid::nil()static method.
Changed
- Made resolution of inner handlers lazy in all buses. In several the handler was immediately resolved, so that the handler middleware could be calculated. Buses that support handler middleware now first pipe through the bus middleware, then resolve the inner handler, then pipe through the handler middleware. This allows inner handler constructor injected dependencies to be lazily resolved after the bus middleware has executed. This is important when using the setup and teardown middleware for bootstrapping services that may be injected into the inner handler. Buses that now lazily resolve inner handlers are:
- Command bus
- Query bus
- Inbound integration event bus
- Outbound integration event bus
- Queue bus
Full Changelog: v2.0.0-rc.1...v2.0.0-rc.2