@@ -5,6 +5,75 @@ All notable changes to this project will be documented in this file. This projec
55
66## Unreleased
77
8+ ### [ 2.0.0-rc.1] - 2024-05-07
9+
10+ ** Refer to the [ Upgrade Guide.] ( ./docs/guide/upgrade.md ) **
11+
12+ ### Added
13+
14+ - ** BREAKING** The command bus interface now has a ` queue() ` method. Our command dispatcher implementation has been
15+ updated to accept a queue factory closure as its third constructor argument. This is an optional argument, so this
16+ change only breaks your implementation if you have manually implemented the command dispatch interface.
17+ - The ` FailedResultException ` now implements ` ContextProvider ` to get log context from the exception's
18+ result object. In Laravel applications, this means the exception context will automatically be logged.
19+ - The ` Result ` interface has a new ` abort() ` method. This throws a ` FailedResultException ` if the result is not
20+ successful.
21+ - The inbound integration event handler container now accepts an optional factory for a default handler. This can be
22+ used to swallow inbound events that the bounded context does not need to consume. We have also added
23+ a ` SwallowInboundEvent ` handler that can be used in this scenario.
24+
25+ ### Changed
26+
27+ - ** BREAKING** Package now uses a _ hexagonal architecture_ approach, which helps clarify the relationship between the
28+ application and infrastructure layers. This means a number of interfaces have been moved to
29+ the ` Contracts\Application\Ports ` namespace, with them differentiated between driving and driven ports.
30+ - ** BREAKING** As a number of interfaces had to be moved to a ` Ports ` namespace, we've tidied them all up by removing
31+ the ` Interface ` suffix and moving them to a ` Contracts ` namespace.
32+ - ** BREAKING** We've also removed the ` Trait ` suffix from traits. To avoid collisions with interfaces, we've use ` Is ` a
33+ prefix where it makes sense. For example, ` EntityTrait ` has become ` IsEntity ` .
34+ - ** BREAKING** The ` DomainEventDispatching ` namespace has been moved from ` Infrastructure ` to ` Application ` . This was
35+ needed for the new hexagonal architecture approach, but also makes it a lot clearer that domain events are the way the
36+ domain layer communicates with the application layer.
37+ - ** BREAKING** The event bus implementation has been split into an inbound event bus (in the application layer) and an
38+ outbound event bus (in the infrastructure layer). With the new hexagonal architecture, this changes was required
39+ because inbound events are received via a driving port, while outbound events are published via a driven port.
40+ - ** BREAKING** Refactored the queue implementation so that commands are queued. The queue implementation was previously
41+ not documented. There is now complete documentation in
42+ the [ Asynchronous Processing chapter] ( docs/guide/application/asynchronous-processing.md ) Refer to that documentation
43+ to upgrade your implementation.
44+ - ** BREAKING** For clarity, the following classes have had their ` pipeline ` constructor argument renamed
45+ to ` middleware ` . You will need to update the construction of these classes if you are using named arguments:
46+ - ` Application\Bus\CommandDispatcher `
47+ - ` Application\Bus\QueryDispatcher `
48+ - ` Application\InboundEventBus\EventDispatcher `
49+ - ` Application\DomainEventDispatching\Dispatcher `
50+ - ` Application\DomainEventDispatching\DeferredDispatcher `
51+ - ` Application\DomainEventDispatching\UnitOfWorkAwareDispatcher `
52+ - ** BREAKING** The command and query validators have been merged into a single class - ` Application\Bus\Validator ` . This
53+ is because there was no functional difference between the two, so this tidies up the implementation.
54+ - ** BREAKING** Renamed the bus ` MessageMiddleware ` interface to ` BusMiddleware ` interface. Also changed the type-hint
55+ for the message from ` Message ` to ` Command|Query ` . This makes this interface clearer about its purpose, as it is
56+ intended only for use with commands and queries - i.e. not integration event messages.
57+ - ** BREAKING** the ` ResultContext ` and ` ObjectContext ` helper classes have been moved to the ` Toolkit\Loggable `
58+ namespace.
59+ - ** BREAKING** The ` Result::value() ` method now throws a ` FailedResultException ` if the result is not successful.
60+ Previously it threw a ` ContractException ` .
61+ - ** BREAKING** The unit of work implementation has been moved to the ` Application\UnitOfWork ` namespace. Previously it
62+ was in ` Infrastructure\Persistence ` . This reflects the fact that the unit of work manager is an application concern.
63+ The unit of work interface is now a driven port.
64+
65+ ### Removed
66+
67+ - ** BREAKING** The pipeline builder factory was no longer required, so the following classes/interfaces have been
68+ deleted. Although breaking, this is unlikely to affect your implementation as these classes were only used internal
69+ within our bus and dispatch implementations.
70+ - ` Toolkit\Pipeline\PipelineBuilderFactoryInterface `
71+ - ` Toolkit\Pipeline\PipelineBuilderFactory `
72+ - ** BREAKING** Removed the following previously deprecated event bus middleware:
73+ - ` LogOutboundIntegrationEvent ` - use ` Infrastructure\OutboundEventBus\Middleware\LogOutboundEvent ` instead.
74+ - ` LogInboundIntegrationEvent ` - use ` Application\InboundEventBus\Middleware\LogInboundEvent ` instead.
75+ - ** BREAKING** Removed the ` Infrastructure::assert() ` helper. This was not documented so is unlikely to be breaking.
76+
877## [ 1.2.0] - 2024-04-05
978
1079### Added
0 commit comments