Skip to content

Commit 04c6588

Browse files
authored
Merge pull request #2389 from Haehnchen/feature/route-name-attribute
support "\\Symfony\\Component\\Routing\\Attribute\\Route" for route url and naming completion
2 parents 593bdfb + ae32e76 commit 04c6588

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteNameAnnotationCompletionProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
public class RouteNameAnnotationCompletionProvider implements PhpAnnotationCompletionProvider {
2828
@Override
2929
public void getPropertyValueCompletions(AnnotationPropertyParameter annotationPropertyParameter, AnnotationCompletionProviderParameter annotationCompletionProviderParameter) {
30-
if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Annotation\\Route")) {
30+
if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Attribute\\Route")) {
3131
return;
3232
}
3333

src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteUrlAnnotationCompletionProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class RouteUrlAnnotationCompletionProvider implements PhpAnnotationCompletionProvider {
1616
@Override
1717
public void getPropertyValueCompletions(AnnotationPropertyParameter annotationPropertyParameter, AnnotationCompletionProviderParameter annotationCompletionProviderParameter) {
18-
if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Annotation\\Route")) {
18+
if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Attribute\\Route")) {
1919
return;
2020
}
2121

0 commit comments

Comments
 (0)