devise icon indicating copy to clipboard operation
devise copied to clipboard

Warn about use of `sign_in user, bypass: true` also warns: Passing the result of `caller` to ActiveSupport::Deprecation#warn is deprecated

Open JasonBarnabe opened this issue 1 year ago • 0 comments

Environment

  • Ruby 3.3.6
  • Rails 7.2.2.1
  • Devise 4.9.4

Current behavior

sign_in user, bypass: true

results in the warning

DEPRECATION WARNING: Passing the result of `caller` to ActiveSupport::Deprecation#warn is deprecated and will be removed in Rails 8.0.
Please pass the result of `caller_locations` instead.

https://github.com/heartcombo/devise/blob/fec67f98f26fcd9a79072e4581b1bd40d0c7fa1d/lib/devise/controllers/sign_in_out.rb#L41

And presumably will fail in Rails 8 too.

Expected behavior

Not fail, not warn about the ActiveSupport thing, but still warn

[Devise] bypass option is deprecated and it will be removed in future version of Devise.
Please use bypass_sign_in method instead.
Example:

  bypass_sign_in(user)

JasonBarnabe avatar Dec 11 '24 17:12 JasonBarnabe