I am trying to use Symfony’s ContainerCommandLoader with this library but it does not list any commands unless I explicitly register them.
See the following minimal example:
<?php
declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
class Foo {
}
$container = new Slince\Di\Container();
// $container->register(Foo::class);
var_dump($container->has(Foo::class));
var_dump($container->get(Foo::class));
which returns
bool(false)
object(Foo)#9 (0) {
}
That is a violation of section 1.1.2 Reading from a container of PSR-11 specification:
If has($id) returns false, get($id) MUST throw a NotFoundExceptionInterface.
I am trying to use Symfony’s
ContainerCommandLoaderwith this library but it does not list any commands unless I explicitly register them.See the following minimal example:
which returns
That is a violation of section 1.1.2 Reading from a container of PSR-11 specification: