Remove deprecated methods on ActiveRecord::LogSubscriber

This commit is contained in:
Rafael Mendonça França 2023-10-13 14:08:21 +00:00
parent 2fb186dabb
commit e509a0edb5
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
3 changed files with 17 additions and 21 deletions

@ -1,3 +1,15 @@
* Remove deprecated `ActiveRecord::LogSubscriber.runtime` method.
*Rafael Mendonça França*
* Remove deprecated `ActiveRecord::LogSubscriber.runtime=` method.
*Rafael Mendonça França*
* Remove deprecated `ActiveRecord::LogSubscriber.reset_runtime` method.
*Rafael Mendonça França*
* Remove deprecated support to define `explain` in the connection adapter with 2 arguments.
*Rafael Mendonça França*

@ -6,27 +6,6 @@ class LogSubscriber < ActiveSupport::LogSubscriber
class_attribute :backtrace_cleaner, default: ActiveSupport::BacktraceCleaner.new
def self.runtime=(value)
ActiveRecord.deprecator.warn(<<-MSG.squish)
ActiveRecord::LogSubscriber.runtime= is deprecated and will be removed in Rails 7.2.
MSG
ActiveRecord::RuntimeRegistry.sql_runtime = value
end
def self.runtime
ActiveRecord.deprecator.warn(<<-MSG.squish)
ActiveRecord::LogSubscriber.runtime is deprecated and will be removed in Rails 7.2.
MSG
ActiveRecord::RuntimeRegistry.sql_runtime
end
def self.reset_runtime
ActiveRecord.deprecator.warn(<<-MSG.squish)
ActiveRecord::LogSubscriber.reset_runtime is deprecated and will be removed in Rails 7.2.
MSG
ActiveRecord::RuntimeRegistry.reset
end
def strict_loading_violation(event)
debug do
owner = event.payload[:owner]

@ -123,6 +123,11 @@ Please refer to the [Changelog][active-record] for detailed changes.
* Remove deprecated support to define `explain` in the connection adapter with 2 arguments.
* Remove deprecated `ActiveRecord::LogSubscriber.runtime` method.
* Remove deprecated `ActiveRecord::LogSubscriber.runtime=` method.
* Remove deprecated `ActiveRecord::LogSubscriber.reset_runtime` method.
### Deprecations