Skip to content

Commit

Permalink
Remove deprecated ActiveSupport::Notifications::Event#children and …
Browse files Browse the repository at this point in the history
…`ActiveSupport::Notifications::Event#parent_of?`
  • Loading branch information
rafaelfranca committed May 1, 2024
1 parent fc2dc7c commit c48aab1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
4 changes: 4 additions & 0 deletions activesupport/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?`.

*Rafael Mendonça França*

* Remove deprecated support to call the following methods without passing a deprecator:

- `deprecate`
Expand Down
17 changes: 0 additions & 17 deletions activesupport/lib/active_support/notifications/instrumenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,23 +173,6 @@ def allocations
@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.
#
Expand Down
2 changes: 2 additions & 0 deletions guides/source/7_2_release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ Please refer to the [Changelog][active-support] for detailed changes.

### Removals

* Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?`.

* Remove deprecated support to call the following methods without passing a deprecator:

- `deprecate`
Expand Down

0 comments on commit c48aab1

Please sign in to comment.