ActiveSupport has moved from having a singleton Deprecation instance that everything gets reported through, to having a collection of deprecators which Rails is setting up at Rails.application.deprecators during boot. Each of the rails gems then has a deprecator instance in that collection, so we need to inject our receiver into each of those to get all warnings out of the app still.
We'll miss anything emitted before oas_agent is injected, but that's existing behaviour so ignoring that for now.
What?
Why?
ActiveSupport has moved from having a singleton
Deprecation
instance that everything gets reported through, to having a collection of deprecators which Rails is setting up atRails.application.deprecators
during boot. Each of the rails gems then has a deprecator instance in that collection, so we need to inject our receiver into each of those to get all warnings out of the app still.We'll miss anything emitted before oas_agent is injected, but that's existing behaviour so ignoring that for now.