Skip to content

Commit 1790432

Browse files
authored
Merge branch 'master' into patch-1
2 parents 6e9f381 + a6f5792 commit 1790432

File tree

13 files changed

+30
-41
lines changed

13 files changed

+30
-41
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
uses: "shivammathur/setup-php@v2"
9898
with:
9999
tools: flex
100-
php-version: "8.1"
100+
php-version: "8.2"
101101
coverage: "none"
102102

103103
- name: "Install dependencies"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"static-analysis": [
9292
"phpstan analyse --ansi --memory-limit=1G"
9393
],
94-
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.17.0/php-cs-fixer.phar -O php-cs-fixer.phar",
94+
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.48.0/php-cs-fixer.phar -O php-cs-fixer.phar",
9595
"fix-cs": [
9696
"@install-cs",
9797
"@php php-cs-fixer.phar fix --diff -v --allow-risky=yes --ansi"

src/Config/TypeDefinition.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ protected function validationSection(int $level): ArrayNodeDefinition
8181
return $value;
8282
}
8383
}
84+
8485
// validation: [list of constraints]
8586
return ['constraints' => $value];
8687
}

src/Controller/ProfilerController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use GraphQL\Utils\SchemaPrinter;
88
use Overblog\GraphQLBundle\Request\Executor as RequestExecutor;
9+
use Overblog\GraphQLBundle\Resolver\TypeResolver;
910
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
1011
use Symfony\Component\HttpFoundation\Request;
1112
use Symfony\Component\HttpFoundation\Response;
@@ -24,14 +25,16 @@ final class ProfilerController
2425
private ?Profiler $profiler;
2526
private ?Environment $twig;
2627
private string $endpointUrl;
28+
private TypeResolver $typeResolver;
2729
private RequestExecutor $requestExecutor;
2830
private ?string $queryMatch;
2931

30-
public function __construct(?Profiler $profiler, ?Environment $twig, RouterInterface $router, RequestExecutor $requestExecutor, ?string $queryMatch)
32+
public function __construct(?Profiler $profiler, ?Environment $twig, RouterInterface $router, TypeResolver $typeResolver, RequestExecutor $requestExecutor, ?string $queryMatch)
3133
{
3234
$this->profiler = $profiler;
3335
$this->twig = $twig;
3436
$this->endpointUrl = $router->generate('overblog_graphql_endpoint');
37+
$this->typeResolver = $typeResolver;
3538
$this->requestExecutor = $requestExecutor;
3639
$this->queryMatch = $queryMatch;
3740
}
@@ -69,9 +72,11 @@ public function __invoke(Request $request, string $token): Response
6972
}, $this->profiler->find(null, $this->queryMatch ?: $this->endpointUrl, $limit, 'POST', null, null, null)); // @phpstan-ignore-line
7073

7174
$schemas = [];
75+
$this->typeResolver->setIgnoreUnresolvableException(true);
7276
foreach ($this->requestExecutor->getSchemasNames() as $schemaName) {
7377
$schemas[$schemaName] = SchemaPrinter::doPrint($this->requestExecutor->getSchema($schemaName));
7478
}
79+
$this->typeResolver->setIgnoreUnresolvableException(false);
7580

7681
return new Response($this->twig->render('@OverblogGraphQL/profiler/graphql.html.twig', [
7782
'request' => $request,

src/Relay/Connection/ConnectionInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ public function setEdges(iterable $edges): void;
2727

2828
/**
2929
* Get the page info.
30-
*
31-
* @return PageInfoInterface
3230
*/
3331
public function getPageInfo(): ?PageInfoInterface;
3432

src/Relay/Connection/Output/PageInfo.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ public function __construct(string $startCursor = null, string $endCursor = null
2323
$this->hasNextPage = $hasNextPage;
2424
}
2525

26-
/**
27-
* @return string
28-
*/
2926
public function getStartCursor(): ?string
3027
{
3128
return $this->startCursor;
@@ -36,9 +33,6 @@ public function setStartCursor(string $startCursor): void
3633
$this->startCursor = $startCursor;
3734
}
3835

39-
/**
40-
* @return string
41-
*/
4236
public function getEndCursor(): ?string
4337
{
4438
return $this->endCursor;
@@ -49,9 +43,6 @@ public function setEndCursor(string $endCursor): void
4943
$this->endCursor = $endCursor;
5044
}
5145

52-
/**
53-
* @return bool
54-
*/
5546
public function getHasPreviousPage(): ?bool
5647
{
5748
return $this->hasPreviousPage;
@@ -62,9 +53,6 @@ public function setHasPreviousPage(bool $hasPreviousPage): void
6253
$this->hasPreviousPage = $hasPreviousPage;
6354
}
6455

65-
/**
66-
* @return bool
67-
*/
6856
public function getHasNextPage(): ?bool
6957
{
7058
return $this->hasNextPage;

src/Relay/Connection/PageInfoInterface.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,18 @@
1212

1313
interface PageInfoInterface
1414
{
15-
/**
16-
* @return string
17-
*/
1815
public function getStartCursor(): ?string;
1916

2017
public function setStartCursor(string $startCursor): void;
2118

22-
/**
23-
* @return string
24-
*/
2519
public function getEndCursor(): ?string;
2620

2721
public function setEndCursor(string $endCursor): void;
2822

29-
/**
30-
* @return bool
31-
*/
3223
public function getHasPreviousPage(): ?bool;
3324

3425
public function setHasPreviousPage(bool $hasPreviousPage): void;
3526

36-
/**
37-
* @return bool
38-
*/
3927
public function getHasNextPage(): ?bool;
4028

4129
public function setHasNextPage(bool $hasNextPage): void;

src/Resolver/TypeResolver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ protected function onLoadSolution($solution): void
4646

4747
/**
4848
* @param string $alias
49-
*
50-
* @return Type
5149
*/
5250
public function resolve($alias): ?Type
5351
{

src/Resources/config/profiler.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
- "@?profiler"
66
- "@?twig"
77
- "@router"
8+
- '@Overblog\GraphQLBundle\Resolver\TypeResolver'
89
- '@Overblog\GraphQLBundle\Request\Executor'
910
- "%overblog_graphql.profiler.query_match%"
1011

src/Upload/Type/GraphQLUploadType.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
final class GraphQLUploadType extends ScalarType
1616
{
17-
/**
18-
* @param string $name
19-
*/
2017
public function __construct(string $name = null)
2118
{
2219
parent::__construct([

0 commit comments

Comments
 (0)