From 27b131a9bda4041d44f1eb18e65f3e26c793e224 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 9 Feb 2023 15:50:06 +0100 Subject: [PATCH] :sparkles: Road to PHP8: remove unused `use` `use phpDocumentor\Reflection\Types\Mixed;` uses the reserved `mixed` keyword --- src/AggregateControllerQueryProvider.php | 15 --------------- src/GraphQLMiddleware.php | 1 - src/QueryField.php | 1 - src/TypeMappingException.php | 1 - tests/AggregateControllerQueryProviderTest.php | 3 --- tests/ControllerQueryProviderTest.php | 5 +---- 6 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/AggregateControllerQueryProvider.php b/src/AggregateControllerQueryProvider.php index 6608184..fb4b44f 100644 --- a/src/AggregateControllerQueryProvider.php +++ b/src/AggregateControllerQueryProvider.php @@ -3,26 +3,11 @@ namespace TheCodingMachine\GraphQL\Controllers; -use phpDocumentor\Reflection\Type; -use phpDocumentor\Reflection\Types\Array_; -use phpDocumentor\Reflection\Types\Mixed; -use phpDocumentor\Reflection\Types\Object_; -use phpDocumentor\Reflection\Types\String_; use Psr\Container\ContainerInterface; -use Roave\BetterReflection\Reflection\ReflectionClass; -use Roave\BetterReflection\Reflection\ReflectionMethod; use Doctrine\Common\Annotations\Reader; -use phpDocumentor\Reflection\Types\Integer; -use TheCodingMachine\GraphQL\Controllers\Annotations\Query; use TheCodingMachine\GraphQL\Controllers\Security\AuthenticationServiceInterface; use TheCodingMachine\GraphQL\Controllers\Security\AuthorizationServiceInterface; use Youshido\GraphQL\Field\Field; -use Youshido\GraphQL\Type\ListType\ListType; -use Youshido\GraphQL\Type\NonNullType; -use Youshido\GraphQL\Type\Scalar\IntType; -use Youshido\GraphQL\Type\Scalar\StringType; -use Youshido\GraphQL\Type\TypeInterface; -use Youshido\GraphQL\Type\Union\UnionType; /** * A query provider that looks into all controllers of your application to fetch queries. diff --git a/src/GraphQLMiddleware.php b/src/GraphQLMiddleware.php index d783609..99b8b3b 100644 --- a/src/GraphQLMiddleware.php +++ b/src/GraphQLMiddleware.php @@ -3,7 +3,6 @@ use GraphQL\GraphQL; use Youshido\GraphQL\Schema\AbstractSchema; -use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Youshido\GraphQL\Execution\Processor; use Zend\Diactoros\Response\JsonResponse; diff --git a/src/QueryField.php b/src/QueryField.php index 16f051d..0d91b90 100644 --- a/src/QueryField.php +++ b/src/QueryField.php @@ -3,7 +3,6 @@ namespace TheCodingMachine\GraphQL\Controllers; -use TheCodingMachine\GraphQL\Controllers\Registry\Registry; use Youshido\GraphQL\Execution\ResolveInfo; use Youshido\GraphQL\Field\AbstractField; use Youshido\GraphQL\Type\AbstractType; diff --git a/src/TypeMappingException.php b/src/TypeMappingException.php index 2a5c2f0..1e5a0b5 100644 --- a/src/TypeMappingException.php +++ b/src/TypeMappingException.php @@ -7,7 +7,6 @@ use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\Types\Array_; use phpDocumentor\Reflection\Types\Mixed_; -use Roave\BetterReflection\Reflection\ReflectionFunction; use Roave\BetterReflection\Reflection\ReflectionMethod; use Roave\BetterReflection\Reflection\ReflectionParameter; diff --git a/tests/AggregateControllerQueryProviderTest.php b/tests/AggregateControllerQueryProviderTest.php index 90fd2f9..6d894e3 100644 --- a/tests/AggregateControllerQueryProviderTest.php +++ b/tests/AggregateControllerQueryProviderTest.php @@ -3,10 +3,7 @@ namespace TheCodingMachine\GraphQL\Controllers; use Doctrine\Common\Annotations\AnnotationReader; -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; -use Psr\Container\NotFoundExceptionInterface; use TheCodingMachine\GraphQL\Controllers\Fixtures\TestController; use TheCodingMachine\GraphQL\Controllers\Security\VoidAuthenticationService; use TheCodingMachine\GraphQL\Controllers\Security\VoidAuthorizationService; diff --git a/tests/ControllerQueryProviderTest.php b/tests/ControllerQueryProviderTest.php index d4dcb75..9fb8bcc 100644 --- a/tests/ControllerQueryProviderTest.php +++ b/tests/ControllerQueryProviderTest.php @@ -3,7 +3,6 @@ namespace TheCodingMachine\GraphQL\Controllers; use Doctrine\Common\Annotations\AnnotationReader; -use PHPUnit\Framework\TestCase; use TheCodingMachine\GraphQL\Controllers\Fixtures\TestController; use TheCodingMachine\GraphQL\Controllers\Fixtures\TestObject; use TheCodingMachine\GraphQL\Controllers\Fixtures\TestType; @@ -13,13 +12,11 @@ use Youshido\GraphQL\Type\InputObject\InputObjectType; use Youshido\GraphQL\Type\ListType\ListType; use Youshido\GraphQL\Type\NonNullType; -use Youshido\GraphQL\Type\Object\ObjectType; use Youshido\GraphQL\Type\Scalar\BooleanType; use Youshido\GraphQL\Type\Scalar\DateTimeType; use Youshido\GraphQL\Type\Scalar\FloatType; use Youshido\GraphQL\Type\Scalar\IntType; use Youshido\GraphQL\Type\Scalar\StringType; -use Youshido\GraphQL\Type\TypeInterface; use TheCodingMachine\GraphQL\Controllers\Annotations\Query; class ControllerQueryProviderTest extends AbstractQueryProviderTest @@ -131,4 +128,4 @@ public function testQueryProviderWithFixedReturnType() $this->assertInstanceOf(TestType::class, $fixedQuery->getType()); } -} \ No newline at end of file +}