Skip to content

Commit

Permalink
fix: take namespace into account while cheking for factory class exis…
Browse files Browse the repository at this point in the history
…tance.
  • Loading branch information
Mohammad-Alavi committed May 2, 2022
1 parent c52588a commit c6a9556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Traits/FactoryLocatorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ protected static function newFactory(): ?Factory

Factory::useNamespace($nameSpace);
$className = class_basename(static::class);
if (!class_exists($className)) {

if (!class_exists($nameSpace . $className . 'Factory')) {
return null;
}

Expand Down

0 comments on commit c6a9556

Please sign in to comment.