All Versions
Latest Version
Avg Release Cycle
150 days
Latest Release
1631 days ago

Changelog History
Page 3

  • v4.0.0 Changes

    ๐Ÿ†• New Features
    • โž• Added support for circular dependencies:
      • Added ObjectGraph scope to reuse resolved instances
      • Added resolveDependencies method on DefinitionOf class to resolve dependencies of resolved instance.
        #11, @ilyapuchka
    • โž• Added methods to register/remove individual definitions.
      #11, @ilyapuchka
    • All resolve methods now can throw error if type can not be resolved.
      #15, @ilyapuchka
    • DependencyContainer is marked as final.
    • โž• Added support for OSX, tvOS and watchOS2.
      #26, @ilyapuchka
    ๐Ÿ’ฅ Breaking Changes
    • โœ‚ Removed container thread-safety to enable recursion calls to resolve.
      Access to container from multiple threads should be handled by clients from now on.
    • All resolve methods now can throw.

      Note on migration from 3.x to 4.0.0:

      • Errors

      In 4.0.0 each resolve method can throw DefinitionNotFound(DefinitionKey) error, so you need to call it using try! or try?, or catch the error if it's appropriate for your case. See #15 for rationale of this change.

      • Thread safety

      In 4.0.0 DependencyContainer drops any guarantee of thread safety. From now on code that uses Dip must ensure that it's methods are called from a single thread. For example if you have registered type as a singleton and later two threads try to resolve it at the same time you can have two different instances of type instead of one as expected. This change was required to enable recursive calls of resolve method to resolve circular dependencies.

      • Removed methods

      Methods deprecated in 3.1.0 are now removed.

  • v3.1.0 Changes

    ๐Ÿ†• New
    • โž• Added name for the first runtime argument in resolve(tag:withArguments: โ€ฆ ) methods to make more clear separation between tag and factory runtime arguments.
    • ๐Ÿ—„ resolve(tag:_: โ€ฆ ) methods are deprecated in favor of those new resolve(tag:withArguments: โ€ฆ ) methods.
    • ๐Ÿ—„ Deprecated register(tag:instance:) method in favor of register(.Singleton) { โ€ฆ }.
  • v3.0.0 Changes

    • โž• Added support for factories with up to six runtime arguments.
      #8, @ilyapuchka
    • Parameter tag is now named in all register/resolve methods.
    • Playground added to project.
      #10, @ilyapuchka

    ### Note on migration from 2.0.0 to 3.0.0:

    If you used tags to register and resolve your components you have to add tag name for tag parameter. Don't forget to add it both in register and resolve methods. If you forget to add it in resolve call then tag value will be treated as first runtime argument for a factory, but there is no such factory registerd, so resolve will fail.


    This code:

      container.register(tag: "some tag") { SomeClass() as SomeProtocol }
      container.resolve("some tag") as SomeProtocol

    becomes this:

      container.register(tag: "some tag") { SomeClass() as SomeProtocol }
      container.resolve(tag: "some tag") as SomeProtocol
  • v2.0.0 Changes

    • ๐Ÿท Moved from generic tag parameter on container to Tag enum with String and Int cases
      #3, @ilyapuchka

    ๐Ÿ‘€ > This API change allows easier use of DependencyContainer and avoid some constraints. For a complete rationale on that change, see PR #3.

  • v1.0.1 Changes

    • ๐Ÿ‘Œ Improved README
    • Imrpoved discoverability using keywords in podspec
  • v1.0.0 Changes

    • โž• Added Unit Tests for SWAPIPersonProvider and SWAPIStarshipProvider

    ๐Ÿšง All work in progress is now done. I consider Dip to be ready for production and with a stable API, hence the 1.0.0 version bump.

    Example Project
    • Using func fetchIDs and func fetchOne instead of lazy var for readability
  • v0.1.0 Changes

    • Dip is now Thread-Safe
    • โž• Added a configuration block so we can easily create the container and register the dependencies all in one expression:
    let deps = DependencyContainer() {
      $0.register() { x as Foo }
      $0.register() { y as Bar }
      $0.register() { z as Baz }
    • ๐Ÿ“š Source Documentation
    Example Project
    • Code Cleanup
    • โž• Added more values to HardCodedStarshipProvider so it works when the PersonProviderAPI uses real pilots from (SWAPIPersonProvider)
  • v0.0.4 Changes

    Example Project
    • โž• Added SWAPIPersonProvider & SWAPIStarshipProvider that use
  • v0.0.3 Changes

    Example Project
    • Revamped the Sample project to a more complete example (using StarWars API!)
    • Using Mixins & Traits in the Sample App for FetchableTrait and FillableCell
  • v0.0.2 Changes

    • Switched from class methods to instance methods (#1). This allows you to have multiple DependencyContainers
    • ๐Ÿ“‡ Renamed the class from Dependency to DependencyContainer
    • ๐Ÿ“‡ Renamed the instanceFactory: parameter to factory:
    • ๐Ÿท Made the DependencyContainer generic of the type of tag. We are no longer limited to tags of type String, we can now use anything that's Equatable.