feat: add deprecation warning infrastructure for renamed config keys#92
Merged
Conversation
Adds SolidStackWeb.deprecator (ActiveSupport::Deprecation scoped to 1.0) and a private deprecated_config helper that generates a forwarding writer with a deprecation warning. Registered with app.deprecators so Rails routes warnings through the standard deprecation pipeline. No keys renamed yet — add deprecated_config :old, :new entries as renames are decided before 1.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cture Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Closes #53
Summary
SolidStackWeb.deprecator— a gem-scopedActiveSupport::Deprecationinstance (horizon: 1.0) registered withapp.deprecators[:solid_stack_web]so Rails routes warnings through the standard deprecation pipelinedeprecated_config(old_key, new_key)helper on the module that generates a forwarding writer with a deprecation warningdeprecated_config :old, :newentries insideclass << selfinlib/solid_stack_web.rbas renames are decided before the 1.0 cutTest plan
bundle exec rspec— 332 examples, 0 failuresSolidStackWeb.deprecated_configspec verifies the warning fires and the value is forwarded to the new keySolidStackWeb.deprecatorspec verifies it returns a memoizedActiveSupport::Deprecationinstance🤖 Generated with Claude Code