Res 3.0 compatibility#465
Closed
tomaszpatrzek wants to merge 2 commits into
Closed
Conversation
RubyEventStore::InMemoryRepository#initialize no longer accepts the ensure_supported_any_usage: keyword in 3.0 — the "no mixing :any with a specific expected position" rule is now enforced unconditionally. Passing the keyword raised ArgumentError. Dropping it preserves the previous behaviour (we passed `true`, which is now the default). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
RES 3.0 removed the apply_<event_name> state-handler naming convention; the default apply strategy now raises AggregateRoot::MissingHandler for it. Switch the (empty) MessageSent/MessageRead handlers to the `on` DSL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
❌ Deploy Preview for ecommerce-events failed. Why did it fail? →
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make ecommerce compatible with RailsEventStore 3.0
RES 3.0 removes APIs that were deprecated in 2.x. This PR adapts ecommerce to
the upcoming release so it keeps working once the deprecated code is gone. Two
independent changes, one commit each.
(infra/lib/infra/event_store.rb)
RubyEventStore::InMemoryRepository#initialize no longer accepts the
ensure_supported_any_usage: keyword in 3.0 — the "no mixing :any with a specific
expected position" rule is now enforced unconditionally. Passing the keyword
raised ArgumentError. We passed true, which is now the default, so simply
dropping it preserves behaviour.
(domains/communication/lib/communication.rb)
RES 3.0 removed the apply_<event_name> state-handler naming convention; the
default apply strategy now raises AggregateRoot::MissingHandler for it. The
(empty) MessageSent / MessageRead handlers in Communication::Message were
switched to the on EventClass do … end DSL.
Compatibility
Both changes are backward-compatible with 2.x — the on DSL and omitting the
keyword both work on current RES, so this can be merged before 3.0 ships.