fix(container): resolves dependencies without contructor

Co-Authored-By: Johannes Pichler <fetzi@users.noreply.github.com>
This commit is contained in:
Nuno Maduro
2020-06-14 16:15:05 +02:00
parent c79c0feec8
commit 3a78aaef8f
2 changed files with 7 additions and 7 deletions

View File

@ -92,6 +92,8 @@ final class Container
return $reflectionClass->newInstanceArgs($params);
}
return $reflectionClass->newInstance();
}
throw ShouldNotHappen::fromMessage(sprintf('A dependency with the name `%s` cannot be resolved.', $id));