Actions
Patch #41141
closedReplace deprecated `ActiveSupport::Deprecation.warn` with custom deprecation object
Patch #41141:
Replace deprecated `ActiveSupport::Deprecation.warn` with custom deprecation object
Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
-
Description
The usage of ActiveSupport::Deprecation.warn has been deprecated in Rails 7.1 and has been removed in Rails 7.2.
The attached patch fixes the deprecated usage by replacing ActiveSupport::Deprecation with a custom deprecation object.
In Rails 7.1.2, calling ActiveSupport::Deprecation.warn produces the following deprecation warning:
$ bin/rails r 'ActiveSupport::Deprecation.warn("warning!")'
DEPRECATION WARNING: warning! (called from require at bin/rails:4)
DEPRECATION WARNING: Calling warn on ActiveSupport::Deprecation is deprecated and will be removed from Rails (use your own Deprecation object instead) (called from require at bin/rails:4)
In Rails 7.2.0, the method is removed, resulting in an error:
Files
Updated by Marius BĂLTEANU over 2 years ago
Updated by Marius BĂLTEANU over 2 years ago
- Related to Feature #36320: Migrate to Rails 7.2 added
Actions