Skip to content

Commit

Permalink
Avoid getting concrete if interface exists 🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-rubel committed Dec 20, 2022
1 parent e8152c5 commit 0933659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/InteractsWithContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function getBindingConcrete(string $class): string
protected function getDependencies(string $class, array $dependencies = []): array
{
if (! Arr::isAssoc($dependencies)) {
if (! class_exists($class)) {
if (! class_exists($class) && ! interface_exists($class)) {
$class = $this->getBindingConcrete($class);
}

Expand Down

0 comments on commit 0933659

Please sign in to comment.