From 80a943dfc35b6120b7d2e7e30e63d579425604ec Mon Sep 17 00:00:00 2001 From: lol Date: Mon, 11 Mar 2019 18:31:14 +0100 Subject: [PATCH] Type annotation for exentend class --- DependencyInjection/GraphqliteCompilerPass.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/GraphqliteCompilerPass.php b/DependencyInjection/GraphqliteCompilerPass.php index f4490ee..e7298aa 100644 --- a/DependencyInjection/GraphqliteCompilerPass.php +++ b/DependencyInjection/GraphqliteCompilerPass.php @@ -90,7 +90,11 @@ public function process(ContainerBuilder $container) //$definition->addTag('graphql.annotated.type'); // Set the types public $reflectionClass = new ReflectionClass($class); - if ($this->getAnnotationReader()->getTypeAnnotation($reflectionClass) !== null || $this->getAnnotationReader()->getExtendTypeAnnotation($reflectionClass) !== null) { + $typeAnnotation = $this->getAnnotationReader()->getTypeAnnotation($reflectionClass); + if ($typeAnnotation !== null && $typeAnnotation->isSelfType()) { + continue; + } + if ($typeAnnotation !== null || $this->getAnnotationReader()->getExtendTypeAnnotation($reflectionClass) !== null) { $definition->setPublic(true); } else { foreach ($reflectionClass->getMethods() as $method) {