Skip to content

Commit 3961f2e

Browse files
authored
Merge pull request #1150 from mathroc/patch-1
Only look at attributes implementing Annotation
2 parents 0170315 + bd9c541 commit 3961f2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Config/Parser/AttributeParser.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Overblog\GraphQLBundle\Config\Parser;
66

7+
use Overblog\GraphQLBundle\Annotation\Annotation;
78
use Overblog\GraphQLBundle\Config\Parser\MetadataParser\MetadataParser;
89
use ReflectionAttribute;
910
use ReflectionClass;
@@ -26,7 +27,7 @@ public static function getMetadatas(Reflector $reflector): array
2627
case $reflector instanceof ReflectionProperty:
2728
case $reflector instanceof ReflectionClassConstant:
2829
if (is_callable([$reflector, 'getAttributes'])) {
29-
$attributes = $reflector->getAttributes();
30+
$attributes = $reflector->getAttributes(Annotation::class, ReflectionAttribute::IS_INSTANCEOF);
3031
}
3132
}
3233

0 commit comments

Comments
 (0)