mirror of https://github.com/rails/rails
Revert "Remove deprecated `children` and `parent_of?` on ActiveSupport::Notifications::Event"
This reverts commit 29679df058
.
This method was deprecated in 7.1, so shouldn't be removed until 7.2.
This commit is contained in:
parent
53a47a9890
commit
fee2bf3f80
|
@ -7,10 +7,6 @@
|
|||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove implicit conversion of objects into `String` by `ActiveSupport::SafeBuffer`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
|
|
@ -165,6 +165,23 @@ module ActiveSupport
|
|||
@allocation_count_finish - @allocation_count_start
|
||||
end
|
||||
|
||||
def children # :nodoc:
|
||||
ActiveSupport.deprecator.warn <<~EOM
|
||||
ActiveSupport::Notifications::Event#children is deprecated and will
|
||||
be removed in Rails 7.2.
|
||||
EOM
|
||||
[]
|
||||
end
|
||||
|
||||
def parent_of?(event) # :nodoc:
|
||||
ActiveSupport.deprecator.warn <<~EOM
|
||||
ActiveSupport::Notifications::Event#parent_of? is deprecated and will
|
||||
be removed in Rails 7.2.
|
||||
EOM
|
||||
start = (time - event.time) * 1000
|
||||
start <= 0 && (start + duration >= event.duration)
|
||||
end
|
||||
|
||||
# Returns the difference in milliseconds between when the execution of the
|
||||
# event started and when it ended.
|
||||
#
|
||||
|
|
|
@ -166,8 +166,6 @@ Please refer to the [Changelog][active-support] for detailed changes.
|
|||
|
||||
* Remove implicit conversion of objects into `String` by `ActiveSupport::SafeBuffer`.
|
||||
|
||||
* Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?`.
|
||||
|
||||
* Remove deprecated support to generate incorrect RFC 4122 UUIDs when providing a namespace ID that is not one of the
|
||||
constants defined on `Digest::UUID`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue