Remove deprecations#1937
Draft
tomaszpatrzek wants to merge 33 commits into
Draft
Conversation
|
Does this also drop the |
Use #in_batches instead.
Use #of_type instead.
Removes the `const_missing` deprecation shim that aliased RailsEventStore::Event, ::Metadata, etc. to their RubyEventStore counterparts. Also removes the deprecation specs and updates scheduler specs to use fully-qualified RubyEventStore::Event. Based on d685cfb7 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drops the dual-firing deprecated_instrument shim from all instrumented wrappers. Each method now fires only *.ruby_event_store events directly. InstrumentedMapper retains the serialize/deserialize rename deprecation layer. Based on 9eab186a Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes the old Projection API: from_stream, from_all_streams, instance
init, when, and run methods. All tests updated to use the new
Projection.init(state).on(EventClass) { }.call(scope) API.
Based on 2cddc9e9
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
call(*scopes) is now call(scope) — only a single scope is accepted. Removes MULTI_SCOPE_DEPRECATION_MESSAGE and the multi-scope reduction loop. Based on f13b20ab Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes NEW_CONSTRUCTOR_DEPRECATION_MESSAGE and _internal flag. Projection.new is now private_class_method; use Projection.init(state). Based on 2b4ce59d Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drops support for apply_EventName handler methods. DefaultApplyStrategy now only resolves handlers via the on DSL (on_methods registry). All tests updated to use on DSL instead of apply_* methods. Based on 6880ad51 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Repository#initialize now requires an explicit event_store argument. AggregateRoot.configure and AggregateRoot::Configuration are removed. Based on 9a3d41189 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all uses with ImmediateDispatcher, which was introduced as the canonical name. Based on 756e0218 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all uses with AfterCommitDispatcher, which was introduced as the canonical name. Based on 935e4d03 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all uses of RubyEventStore::Dispatcher with SyncScheduler. Update Broker default dispatcher and broker_lint shared examples. Based on c8bc3dae Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SyncScheduler now only accepts instances and callables. Passing a class is no longer supported. Based on fed065b91 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace with Upcast transformation. Remove events_class_remapping option from Default and JSONMapper mappers, and from protobuf mapper. Based on cabb98b16 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace remaining uses with Default.new, which is the canonical replacement. Based on 19bcfdb7b Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
It was identical to Default mapper. Replace all uses with Default. Based on 9bbac9bd Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use AggregateRoot.with(strategy: ...) directly. with_default_apply_strategy was identical to include AggregateRoot. Based on c38b0c44 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
InstrumentedMapper now only fires event_to_record and record_to_event instrumentation events, which were introduced as the canonical names. Based on ea7110e5e Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ository append_to_stream and update_messages now only include records: in their instrumentation payload, dropping the legacy events: and messages: aliases. Based on 80834331f Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mixing :any with specific positions (or :auto) now always raises UnsupportedVersionAnyUsage. The opt-in flag and deprecation warning are removed. Based on e5e6531b1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tError instead Replace warn blocks with immediate ArgumentError raises when nil is passed to publish, append, or link. Update specs to expect ArgumentError. Based on deprecation-warnings commit c2714e9
Remove the runtime warn from the compat shim and the post_install_message from the gemspec. The old gem name no longer emits warnings; users should have migrated to ruby_event_store-active_record. Based on deprecation-warnings commit 6954e54
2a978d1 to
1fdf3e4
Compare
Replace apply_order_created method with on DSL handler and update the MissingHandler error message expectation to match the new format.
Verify that event_to_record encodes metadata as a binary string, not a plain Ruby hash. Without ProtobufNestedStructMetadata in the pipeline, metadata would pass through unchanged and this test would fail.
Transform was only used by apply_handler_name to convert event type strings to snake_case method names. With apply_* convention removed, nothing references Transform anymore. Based on 6880ad51 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add NullHandler constant for non-strict no-op case - Replace if/elsif pattern with on_handler using fetch + rescue KeyError - Use lambda in missing_handler to defer the raise until the event is dispatched - Fix error message word order: "on aggregate X for Y" Based on 6880ad51 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…EADME Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Raise in enrich_event_metadata for nil element (not only in enrich_events_metadata) - Match original error message: "Event cannot be `nil`" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
@cbillen sorry for the hassle with superfluous deprecation messages. This shouldn't happen. I just finished working on a fix and refactoring the way we handle deprecations at all. People who use this shim indirectly shouldn't be penalized and I was able to achieve that (already on the master branch). The 2.19.2 is expected to resolve this soon. Following branch needs to be readjusted though. |
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.
Remove deprecated code
This branch removes everything that was warned about in the deprecation-warnings branch. Each commit
corresponds to one deprecation warning and references the source commit that introduced it.
What's removed
Specification
RailsEventStore
Projection
AggregateRoot
Dispatchers
Mappers
Repository
Client
Gem