#85344Use trait for public method access deprecation
Description
There are a few locations which use debug_backtrace() to determine whether a method was called internally or by 3rd party.
This should be replaced by the PublicMethodDeprecationTrait.