Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Fixing Zend\Di to let it accept requesting interfacesResolution of th…
Browse files Browse the repository at this point in the history
…e interface to an actual instantiable class is up to the user, but now it is possible to request an instance of an interface if the correct instantiator has been defined in Di definition configuration
  • Loading branch information
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Definition/RuntimeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function hasClass($class)
return (array_key_exists($class, $this->classes));
}

return class_exists($class, true);
return class_exists($class) || interface_exists($class);
}

/**
Expand Down

0 comments on commit 5778623

Please sign in to comment.