Skip to content
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

Introduce Devise.deprecator #5590

Closed

Conversation

marcoroth
Copy link

@marcoroth marcoroth commented Apr 21, 2023

Rails 7.1 will deprecate the usage of the singleton ActiveSupport::Deprecation instance. This change was introduced via rails/rails#47354.

This pull request defines Devise.deprecator for the gem and uses it throughout the codebase.

Resolves #5589
Inspired by rails/sprockets-rails#517

@@ -62,7 +62,7 @@ module Authenticatable
:remember_token, :unconfirmed_email, :failed_attempts, :unlock_token, :locked_at]

include Devise::DeprecatedConstantAccessor
deprecate_constant "BLACKLIST_FOR_SERIALIZATION", "Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION"
deprecate_constant "BLACKLIST_FOR_SERIALIZATION", "Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION", deprecator: Devise.deprecator
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the delta which resolves #5589

Copy link

@piperswe piperswe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! (not a maintainer, just trying to push this along) Hopefully this gets merged before Rails 7.1's release.

@marcoroth
Copy link
Author

I just noticed this is a duplicate of #5583. I'm going to close this one.

@marcoroth marcoroth closed this May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warning: calling DeprecatedConstantAccessor.deprecate_constant without a deprecator
2 participants