diff --git a/Gemfile b/Gemfile index 09e645a..a926456 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,7 @@ eval_gemfile "Gemfile.devtools" gemspec gem "dry-configurable" +gem "dry-core", github: "dry-rb/dry-core", branch: "main" group :tools do gem "pry-byebug", platform: :mri diff --git a/lib/dry/container.rb b/lib/dry/container.rb index 1236948..65501b1 100644 --- a/lib/dry/container.rb +++ b/lib/dry/container.rb @@ -8,6 +8,17 @@ require "dry/container/namespace_dsl" require "dry/container/mixin" require "dry/container/version" +begin + require "dry/core" + + if defined?(Dry::Core::Container) + warn "dry-container is deprecated and is now provided by dry-core as Dry::Core::Container" + else + warn "dry-container is deprecated, please upgrade to the latest dry-core as it now ships with Dry::Core::Container built-in" + end +rescue NameError +end + # A collection of micro-libraries, each intended to encapsulate # a common task in Ruby module Dry