yiisoft/di

Incorrect exception on trying to get object with undefined exception

vjik opened this issue · 1 comments

vjik commented

Test

public function testUndefinedDependencies(): void
:

$container = new Container(
	[
		'car' => Car::class,
	]
);

$this->expectException(NotFoundException::class);
$container->get('car');

Should throws NotInstantiableException instead of NotFoundException.

Seems to contradict PSR:

photo_2021-11-20_00-56-08