-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump removal horizon for 3.x deprecations #4025
Bump removal horizon for 3.x deprecations #4025
Conversation
Now that we are close to the release of 3.0, we need to change the deprecation horizon of our Spree::Deprecation class in order to print the right messages to user when we emit a deprecation warning. This change will tell users that code deprecated using Spree::Deprecation will be removed in Solidus 4.0.
@kennyadsl I'm wondering if we can write some code that will remove the need to periodically increment that number manually. I'm not sure how viable this is (is there any exception to the rule?), but maybe something like this may work: Deprecation = begin
version = Spree.solidus_gem_version.prerelease? ? Spree.solidus_gem_version.segments.first : Spree.solidus_gem_version.segments.first + 1
ActiveSupport::Deprecation.new("#{version}.0" , 'Solidus')
end |
@spaghetticode good idea, I was thinking that just picking the next major would be enough though. Why we'd need the prerelease check? |
@kennyadsl I was inspired by the current behavior, I mean before this PR. We're on It's rather unlikely, but what would happen if we needed to introduce a new deprecation today? Would it need to be removed before the 3.0 final release or it would remain there until 4.0? |
Got it. I think we should have done this before, actually. Version I'm wondering if we want to keep the deprecation cycle as is or we want to update it to reflect what Rails does (remove deprecated functionality in minor versions). This is also what we state here:
even if we never applied this rule. That said, until we end up with a decision, I'd keep it as a manual update. |
Sure, we can automate later 👍 |
Description
Now that we are close to the release of
3.0
, we need to change the deprecation horizon of ourSpree::Deprecation
class in order to print the right messages to users when we emit a deprecation warning.This change will tell users that code deprecated using
Spree::Deprecation
will be removed in Solidus4.0
.Checklist: