heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
23.89k stars 5.54k forks source link

Deprecation warning: calling `DeprecatedConstantAccessor.deprecate_constant` without a deprecator #5589

Closed marcoroth closed 1 year ago

marcoroth commented 1 year ago

Environment

Current behavior

DEPRECATION WARNING: DeprecatedConstantAccessor.deprecate_constant without a deprecator is deprecated (called from <module:Authenticatable> at ~/.anyenv/envs/rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/devise-4.9.2/lib/devise/models/authenticatable.rb:65)

Context: https://github.com/rails/rails/pull/47354

Expected behavior

The gem shouldn't log a deprecation warning

marcoroth commented 1 year ago

What is devise's maintenance policy for maintained Rails versions? I'm wondering if we can remove Devise::DeprecatedConstantAccessor and require Rails 5.1+ in 5.0, looking at the comment:

Copy of constant deprecation module from Rails / Active Support version 6, so we can use it with Rails <= 5.0 versions. This can be removed once we support only Rails 5.1 or greater.`

rafaelfranca commented 1 year ago

This should be fixed on master now

miharekar commented 11 months ago

Any ETA when this'll get released? It's quite noisy in Rails 7.1 😅

contentfree commented 10 months ago

@rafaelfranca What's stopping a new release (that will then include this fix)? Like miharekar said: It's noisy in Rails 7.1.

lmansur commented 6 months ago

For those wondering, Devise 4.9.3 was released with the fix for this back in October 2023: https://rubygems.org/gems/devise/versions/4.9.3 https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#493---2023-10-11