From b90787315b2e2de31acac56a2e3c721d1fffdf27 Mon Sep 17 00:00:00 2001 From: Tim Riley Date: Sun, 3 Nov 2024 23:02:45 +1100 Subject: [PATCH] Restore find_and_load_provider method as an alias (#277) This was used by earlier 2.x versions of Hanami, so usage is out in the wild. We should maintain this method to ensure nothing breaks. --- lib/dry/system/provider_registrar.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dry/system/provider_registrar.rb b/lib/dry/system/provider_registrar.rb index 4e878da5..a63eb430 100644 --- a/lib/dry/system/provider_registrar.rb +++ b/lib/dry/system/provider_registrar.rb @@ -103,6 +103,9 @@ def [](provider_name) providers[provider_name] end + # @api public + alias_method :find_and_load_provider, :[] + # @api private def key?(provider_name) providers.key?(provider_name)