Skip to content

Commit

Permalink
DecoratorExtension: add condition interface_exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz authored and dg committed Dec 20, 2020
1 parent f05c99e commit 997b4fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DI/Extensions/DecoratorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function beforeCompile()
{
$this->getContainerBuilder()->resolve();
foreach ($this->config as $type => $info) {
if (!class_exists($type)) {
if (!class_exists($type) && !interface_exists($type)) {
throw new Nette\DI\InvalidConfigurationException("Decorator class '$type' not found.");
}
if ($info->inject !== null) {
Expand Down

0 comments on commit 997b4fc

Please sign in to comment.