Skip to content

Commit e509a0e

Browse files
committed
Remove deprecated methods on ActiveRecord::LogSubscriber
1 parent 2fb186d commit e509a0e

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

activerecord/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
* Remove deprecated `ActiveRecord::LogSubscriber.runtime` method.
2+
3+
*Rafael Mendonça França*
4+
5+
* Remove deprecated `ActiveRecord::LogSubscriber.runtime=` method.
6+
7+
*Rafael Mendonça França*
8+
9+
* Remove deprecated `ActiveRecord::LogSubscriber.reset_runtime` method.
10+
11+
*Rafael Mendonça França*
12+
113
* Remove deprecated support to define `explain` in the connection adapter with 2 arguments.
214

315
*Rafael Mendonça França*

activerecord/lib/active_record/log_subscriber.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,6 @@ class LogSubscriber < ActiveSupport::LogSubscriber
66

77
class_attribute :backtrace_cleaner, default: ActiveSupport::BacktraceCleaner.new
88

9-
def self.runtime=(value)
10-
ActiveRecord.deprecator.warn(<<-MSG.squish)
11-
ActiveRecord::LogSubscriber.runtime= is deprecated and will be removed in Rails 7.2.
12-
MSG
13-
ActiveRecord::RuntimeRegistry.sql_runtime = value
14-
end
15-
16-
def self.runtime
17-
ActiveRecord.deprecator.warn(<<-MSG.squish)
18-
ActiveRecord::LogSubscriber.runtime is deprecated and will be removed in Rails 7.2.
19-
MSG
20-
ActiveRecord::RuntimeRegistry.sql_runtime
21-
end
22-
23-
def self.reset_runtime
24-
ActiveRecord.deprecator.warn(<<-MSG.squish)
25-
ActiveRecord::LogSubscriber.reset_runtime is deprecated and will be removed in Rails 7.2.
26-
MSG
27-
ActiveRecord::RuntimeRegistry.reset
28-
end
29-
309
def strict_loading_violation(event)
3110
debug do
3211
owner = event.payload[:owner]

guides/source/7_2_release_notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ Please refer to the [Changelog][active-record] for detailed changes.
123123

124124
* Remove deprecated support to define `explain` in the connection adapter with 2 arguments.
125125

126+
* Remove deprecated `ActiveRecord::LogSubscriber.runtime` method.
127+
128+
* Remove deprecated `ActiveRecord::LogSubscriber.runtime=` method.
129+
130+
* Remove deprecated `ActiveRecord::LogSubscriber.reset_runtime` method.
126131

127132
### Deprecations
128133

0 commit comments

Comments
 (0)