Skip to content

Commit 5e140c3

Browse files
committed
Merge commit '85aabf72751b6b240b6b64fd708c1ea0f5d25fdf' into fix/add-oneOf-to-schema-printer
2 parents dd9a930 + 85aabf7 commit 5e140c3

24 files changed

Lines changed: 199 additions & 67 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"amphp/http-server": "^2.1",
1919
"dms/phpunit-arraysubset-asserts": "dev-master",
2020
"ergebnis/composer-normalize": "^2.28",
21-
"friendsofphp/php-cs-fixer": "3.82.1",
21+
"friendsofphp/php-cs-fixer": "3.82.2",
2222
"mll-lab/php-cs-fixer-config": "5.11.0",
2323
"nyholm/psr7": "^1.5",
2424
"phpbench/phpbench": "^1.2",

tests/Executor/AbstractTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,9 @@ public function testHintsOnConflictingTypeInstancesInResolveType(): void
751751
],
752752
]);
753753

754-
$schema = new Schema(['query' => $query]);
754+
$schema = new Schema([
755+
'query' => $query,
756+
]);
755757
$schema->assertValid();
756758

757759
$query = '

tests/Executor/DeferredFieldsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ public function testComplexRecursiveDeferredFields(): void
452452
},
453453
]);
454454

455-
$schema = new Schema(['query' => $complexType]);
455+
$schema = new Schema([
456+
'query' => $complexType,
457+
]);
456458

457459
$query = Parser::parse('
458460
{

tests/Executor/ExecutorSchemaTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ public function testExecutesUsingASchema(): void
105105
],
106106
]);
107107

108-
$BlogSchema = new Schema(['query' => $BlogQuery]);
108+
$BlogSchema = new Schema([
109+
'query' => $BlogQuery,
110+
]);
109111

110112
$request = '
111113
{

tests/Executor/ExecutorTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ public function testExecutesArbitraryCode(): void
156156
'deeper' => ['type' => Type::listOf($dataType)],
157157
],
158158
]);
159-
$schema = new Schema(['query' => $dataType]);
159+
$schema = new Schema([
160+
'query' => $dataType,
161+
]);
160162

161163
self::assertEquals(
162164
$expected,
@@ -205,7 +207,9 @@ public function testMergesParallelFragments(): void
205207
},
206208
]);
207209

208-
$schema = new Schema(['query' => $Type]);
210+
$schema = new Schema([
211+
'query' => $Type,
212+
]);
209213
$expected = [
210214
'data' => [
211215
'a' => 'Apple',
@@ -826,7 +830,9 @@ public function testCorrectFieldOrderingDespiteExecutionOrder(): void
826830
'e' => ['type' => Type::string()],
827831
],
828832
]);
829-
$schema = new Schema(['query' => $queryType]);
833+
$schema = new Schema([
834+
'query' => $queryType,
835+
]);
830836

831837
$expected = [
832838
'data' => [

tests/Executor/ListsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ private function check(Type $testType, $testData, array $expected, int $debug =
8686
},
8787
]);
8888

89-
$schema = new Schema(['query' => $dataType]);
89+
$schema = new Schema([
90+
'query' => $dataType,
91+
]);
9092

9193
$ast = Parser::parse('{ nest { test } }');
9294

tests/Executor/NonNullTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ protected function setUp(): void
106106
},
107107
]);
108108

109-
$this->schema = new Schema(['query' => $dataType]);
109+
$this->schema = new Schema([
110+
'query' => $dataType,
111+
]);
110112

111113
$this->schemaWithNonNullArg = new Schema([
112114
'query' => new ObjectType([

tests/Executor/UnionInterfaceTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,9 @@ public function testGetsExecutionInfoInResolver(): void
550550
],
551551
]);
552552

553-
$schema2 = new Schema(['query' => $PersonType2]);
553+
$schema2 = new Schema([
554+
'query' => $PersonType2,
555+
]);
554556

555557
$john2 = new Person('John', [], [$this->liz]);
556558

tests/Executor/VariablesTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ private function schema(): Schema
194194
],
195195
]);
196196

197-
return new Schema(['query' => $TestType]);
197+
return new Schema([
198+
'query' => $TestType,
199+
]);
198200
}
199201

200202
/**

tests/IntegerFloatPrimitiveIntrospectionTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public static function build(): Schema
3535
],
3636
]);
3737

38-
return new Schema(['query' => $queryType]);
38+
return new Schema([
39+
'query' => $queryType,
40+
]);
3941
}
4042

4143
public function testDefaultValues(): void

0 commit comments

Comments
 (0)