Skip to content

Support the Decision of event-sourcing 4.0 - #346

Merged
DavidBadura merged 4 commits into
4.0.xfrom
dcb-decision
Nov 8, 2026
Merged

DavidBadura merged 4 commits into
4.0.xfrom
dcb-decision

Conversation

@DavidBadura

@DavidBadura DavidBadura commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

event-sourcing 4.0 replaced the DecisionModelBuilder with a Decision (patchlevel/event-sourcing#937), so the bundle failed to build the container with dcb enabled.

With DCB the bundle now registers the DecisionFactory instead of the builder. Unlike the library command bus, messenger handlers only get the command, so they inject the factory and begin a decision per command. The docs show how.

AppendConditionNotMet is now retried by default as well, same as in the library.

Since event-sourcing 4.0 requires PHP 8.4, the bundle does too now.

event-sourcing 4.0 replaced the DecisionModelBuilder with a Decision that
is started from the DecisionFactory. Messenger handlers only get the
command, so they inject the factory and begin a decision themselves.
Same default as in event-sourcing, a failed append condition of a
decision is just as retryable as an outdated aggregate.
event-sourcing 4.0 requires PHP 8.4, so the bundle can't be installed on
older versions anymore.
@DavidBadura DavidBadura added this to the 4.0.0 milestone Nov 8, 2026
@DavidBadura DavidBadura added the enhancement New feature or request label Nov 8, 2026
@DavidBadura
DavidBadura merged commit 39630bf into 4.0.x Nov 8, 2026
15 checks passed
@DavidBadura
DavidBadura deleted the dcb-decision branch November 8, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant