Skip to content

3.3.1

Compare
Choose a tag to compare
@lucatume lucatume released this 17 Mar 08:40
· 37 commits to master since this release

3.3.1

Fixed

  • Allow bound interfaces to properly resolve their concrete class when the concrete class has contextual bindings (thanks @defunctl). e.g. the following will now work properly:
$container = new \lucatume\DI52\Container();
$container->bind(SomeInterface::class, SomeClass::class);
$container->when(Someclass:class)
    ->needs('$num')
    ->give(20);

// This now works, properly resolving SomeClass::class.
$instance = $container->get(SomeInterface::class);