Skip to content

v0.21.0

Compare
Choose a tag to compare
@dry-bot dry-bot released this 31 Oct 23:18

Added

  • Added component dir namespaces as a way to specify multiple, ordered, independent namespace rules within a given component dir. This replaces and expands upon the namespace support we previously provided via the singular default_namespace component dir setting (@timriley in #181)

Changed

  • default_namespace setting on component dirs has been deprecated. Add a component dir namespace instead, e.g. instead of:

    # Inside Dry::System::Container.configure
    config.component_dirs.add "lib" do |dir|
      dir.default_namespace = "admin"
    end

    Add this:

    config.component_dirs.add "lib" do |dir|
      dir.namespaces.add "admin", key: nil
    end

    (@timriley in #181)

  • Dry::System::Component#path has been removed and replaced by Component#require_path and Component#const_path (@timriley in #181)

  • Unused Dry::System::FileNotFoundError and Dry::System::InvalidComponentIdentifierTypeError errors have been removed (@timriley in #194)

Compare v0.20.0...v0.21.0