Skip to content

Commit

Permalink
Release time! (#434)
Browse files Browse the repository at this point in the history
* Bump `console` component
* Bump `dependency_injection` component
* Bump `dotenv` component
* Bump `framework` component
* Bump `spec` component
* Bump `validator` component
  • Loading branch information
Blacksmoke16 authored Jul 31, 2024
1 parent f957999 commit 060475e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [0.4.1] - 2024-07-31

### Changed

- **Breaking:** single implementation aliases are now explicit ([#408](https://github.com/athena-framework/athena/pull/408)) (George Dietrich)

### Fixed

- Fix default/nil values related to `object_of` and `array_of` being unavailable in bundle extensions ([#432](https://github.com/athena-framework/athena/pull/432)) (George Dietrich)

## [0.4.0] - 2024-04-09

### Changed
Expand Down Expand Up @@ -173,6 +183,7 @@ _Major refactor of the component._

_Initial release._

[0.4.1]: https://github.com/athena-framework/dependency-injection/releases/tag/v0.4.1
[0.4.0]: https://github.com/athena-framework/dependency-injection/releases/tag/v0.4.0
[0.3.8]: https://github.com/athena-framework/dependency-injection/releases/tag/v0.3.8
[0.3.7]: https://github.com/athena-framework/dependency-injection/releases/tag/v0.3.7
Expand Down
38 changes: 38 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

Documents the changes that may be required when upgrading to a newer component version.

## Upgrade to 0.4.1

### Single implementation aliases are now explicit

Previously if you had a service that implemented an interface (module), that interface would auto resolve to that service if there was only the one implementation.
This implicit aliasing of the interface was removed and now requires an explicit aliasing.

Before:
```crystal
module SomeInterface; end
@[ADI::Register]
class Foo
include SomeInterface
end
@[ADI::Register(public: true)]
record Bar, a : SomeInterface
```

After:
```crystal
module SomeInterface; end
@[ADI::Register]
@[ADI::AsAlias]
class Foo
include SomeInterface
end
@[ADI::Register(public: true)]
record Bar, a : SomeInterface
```

If the service only implements a single interface, you just need to apply the [`@[ADI::AsAlias]`](https://athenaframework.org/DependencyInjection/AsAlias/) annotation to the service.
If it implements more than one interface, you'll need an annotation for each one.
See the API docs for more information on how to use the annotation.

## Upgrade to 0.4.0

_The component went through a large internal refactor as part of this release. Please create an issue or PR if you find a breaking change not captured here._
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: athena-dependency_injection

version: 0.4.0
version: 0.4.1

crystal: ~> 1.4

Expand Down
2 changes: 1 addition & 1 deletion src/athena-dependency_injection.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ alias ADI = Athena::DependencyInjection

# Robust dependency injection service container framework.
module Athena::DependencyInjection
VERSION = "0.4.0"
VERSION = "0.4.1"

private BINDINGS = {} of Nil => Nil
private EXTENSIONS = {} of Nil => Nil
Expand Down

0 comments on commit 060475e

Please sign in to comment.