From ae32e76e7249cdab304b48769be60ee4cc024fd4 Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Sat, 3 Aug 2024 10:15:23 +0200 Subject: [PATCH] support "\\Symfony\\Component\\Routing\\Attribute\\Route" for route url and naming completion --- .../annotation/RouteNameAnnotationCompletionProvider.java | 2 +- .../annotation/RouteUrlAnnotationCompletionProvider.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteNameAnnotationCompletionProvider.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteNameAnnotationCompletionProvider.java index 14aa67d51..6ec3f1d90 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteNameAnnotationCompletionProvider.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteNameAnnotationCompletionProvider.java @@ -27,7 +27,7 @@ public class RouteNameAnnotationCompletionProvider implements PhpAnnotationCompletionProvider { @Override public void getPropertyValueCompletions(AnnotationPropertyParameter annotationPropertyParameter, AnnotationCompletionProviderParameter annotationCompletionProviderParameter) { - if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Annotation\\Route")) { + if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Attribute\\Route")) { return; } diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteUrlAnnotationCompletionProvider.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteUrlAnnotationCompletionProvider.java index 7c143455d..9f82e9262 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteUrlAnnotationCompletionProvider.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/annotation/RouteUrlAnnotationCompletionProvider.java @@ -15,7 +15,7 @@ public class RouteUrlAnnotationCompletionProvider implements PhpAnnotationCompletionProvider { @Override public void getPropertyValueCompletions(AnnotationPropertyParameter annotationPropertyParameter, AnnotationCompletionProviderParameter annotationCompletionProviderParameter) { - if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Annotation\\Route")) { + if (!Symfony2ProjectComponent.isEnabled(annotationPropertyParameter.getProject()) || !PhpElementsUtil.isInstanceOf(annotationPropertyParameter.getPhpClass(), "\\Symfony\\Component\\Routing\\Annotation\\Route", "\\Symfony\\Component\\Routing\\Attribute\\Route")) { return; }