opulencephp/Opulence

Why $fallBackToUniversalBindings === false in Opulence\Ioc\Container::hasBinding?

alchimik opened this issue · 2 comments

https://github.com/opulencephp/Opulence/blob/1.0/src/Opulence/Ioc/Container.php#L139

$container = new Container();
class Foo {}
$interface = "interface";
$container->bindInstance($interface, new Foo);
$container->for("foo", function (IContainer $container) use ($interface) {
     var_dump($container->hasBinding($interface));         // false
     var_dump(get_class($container->resolve($interface))); // 'Foo'
});

hasBinding === false, but we can resolve anyway. I think it's weird.

Yup, thanks. Should have a fix out shortly.