Skip to content

Commit 14b2b62

Browse files
Merge pull request #3 from truffolone/main
Fix: added check on interface exists for joined entity
2 parents b6d39cb + 3b2d92c commit 14b2b62

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/SharedQueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ protected function getEntityClassFromFirstJoinStringArgument(string $join): stri
401401
);
402402
}
403403

404-
if(!\class_exists($entity)) {
404+
if (!\class_exists($entity) && !\interface_exists($entity)) {
405405
throw new LogicException(
406406
\sprintf(
407407
'Found string for string join "%s" in %s is expected to be a class-string',

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ protected function createSqb(): SharedQueryBuilder
1414
{
1515
return new SharedQueryBuilder(
1616
new QueryBuilder(
17-
$this->createStub(EntityManagerInterface::class)
17+
self::createStub(EntityManagerInterface::class)
1818
)
1919
);
2020
}

0 commit comments

Comments
 (0)