reidmorrison/rails_semantic_logger

Deprecation warning with Rails 7 usage of `ActiveSupport::Deprecation` singleton

alexmalus opened this issue · 0 comments

Environment

Provide at least:

  • Ruby Version: 3.1.4
  • Rails Version: 7.1.2
  • Semantic Logger Version: 4.15.0
  • Rails Semantic Logger Version: 4.14.0
  • Other Application/framework names and versions: Puma 6.4.0
  • Rails configuration. Only need the settings related to Rails Semantic Logger and Semantic Logger.
  • Full Stack Trace, if an exception is being raised.

Note:

Expected Behavior

  • Deprecation warning is resolved

Actual Behavior

Running rails server with a condition causing Rails to cause an exception (like not all migrations being executed) outputs a deprecation warning traced back to this line:

Snippet from the logs:

Rails -- Exception: ActiveRecord::PendingMigrationError:

[..]

Rails -- DEPRECATION WARNING: Calling silence on ActiveSupport::Deprecation is deprecated and will be removed from Rails (use Rails.application.deprecators.silence instead) (called from log_error at /gem_path/rails_semantic_logger-4.14.0/lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb:10)

Rails 7 deprecated ActiveSupport::Deprecation singleton usage.
Mentioned: https://github.com/rails/rails/releases/tag/v7.1.0.beta1 -> Deprecate usage of the singleton ActiveSupport::Deprecation
PR where deprecation has been made: rails/rails#47354

Pull Request

  • Consider submitting a Pull Request with a fix for the issue.
    • This is particularly helpful when running newer Rails versions, since we are not running it yet.
  • Or, even a Pull request that only includes a test that reproduces the problem.

Happy to submit a Pull Request, need the access right. I was unaware of https://docs.github.com/en/get-started/quickstart/contributing-to-projects.