Skip to content

Commit 9b05fc2

Browse files
authored
Merge pull request #1957 from Haehnchen/feature/entity-completion
add more (getReference, getClassMetadata, getPartialReference) Doctrine entity class constant completion
2 parents 166c8ad + 6257af1 commit 9b05fc2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/doctrine/completion/DoctrineCompletionContributor.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ protected void addCompletions(@NotNull CompletionParameters completionParameters
4444
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "Doctrine\\Common\\Persistence\\ObjectManager", "getRepository") ||
4545
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "Doctrine\\Common\\Persistence\\ManagerRegistry", "getRepository") ||
4646
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "Doctrine\\Persistence\\ObjectManager", "getRepository") ||
47-
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "Doctrine\\Persistence\\ManagerRegistry", "getRepository")
47+
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "Doctrine\\Persistence\\ManagerRegistry", "getRepository") ||
48+
49+
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "\\Doctrine\\ORM\\EntityManagerInterface", "getReference") ||
50+
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "\\Doctrine\\ORM\\EntityManagerInterface", "getClassMetadata") ||
51+
PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, "\\Doctrine\\ORM\\EntityManagerInterface", "getPartialReference")
4852
)) {
4953
return;
5054
}

0 commit comments

Comments
 (0)