Skip to content

Commit

Permalink
set 0.5 in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed May 19, 2023
1 parent a03e47a commit 0e1a17c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
## 0.5.0
### 2023-05-19

- Accept `Closure|string` in `getParametersToResolve()`
- Added `resolve(callable)` to `ContainerInterface`
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ composer require gacela-project/container

Get an instance by class name.

> You can define a map between an interface and the concrete class that you want to create (or use) when that interface is found during the process of auto-wiring via its constructor. For example:
> You can define a map between an interface and the concrete class that you want to create (or use) when that interface is found during the process of auto-wiring via its constructor.
### Container

Expand All @@ -42,10 +42,10 @@ This container will auto-wire all inner dependencies from that class. Depending

```php
$bindings = [
AbstractString::class => StringClass::class),
ClassInterface::class => new ConcreteClass(/* args */)),
ComplexInterface::class => new class() implements Foo {/** logic */}),
FromCallable::class => fn() => new StringClass('From callable')),
AbstractString::class => StringClass::class,
ClassInterface::class => new ConcreteClass(/* args */),
ComplexInterface::class => new class() implements Foo {/** logic */},
FromCallable::class => fn() => new StringClass('From callable'),
];

$container = new Container($bindings);
Expand Down

0 comments on commit 0e1a17c

Please sign in to comment.