File tree 2 files changed +2
-26
lines changed 2 files changed +2
-26
lines changed Original file line number Diff line number Diff line change @@ -270,9 +270,6 @@ public function validateTypes()
270
270
} elseif ($ type instanceof InterfaceType) {
271
271
// Ensure fields are valid.
272
272
$ this ->validateFields ($ type );
273
-
274
- // Ensure Interfaces include at least 1 Object type.
275
- $ this ->validateInterfaces ($ type );
276
273
} elseif ($ type instanceof UnionType) {
277
274
// Ensure Unions include valid member types.
278
275
$ this ->validateUnionMembers ($ type );
@@ -517,23 +514,6 @@ private function validateObjectInterfaces(ObjectType $object)
517
514
}
518
515
}
519
516
520
- private function validateInterfaces (InterfaceType $ iface )
521
- {
522
- $ possibleTypes = $ this ->schema ->getPossibleTypes ($ iface );
523
-
524
- if (count ($ possibleTypes ) !== 0 ) {
525
- return ;
526
- }
527
-
528
- $ this ->reportError (
529
- sprintf (
530
- 'Interface %s must be implemented by at least one Object type. ' ,
531
- $ iface ->name
532
- ),
533
- $ iface ->astNode
534
- );
535
- }
536
-
537
517
/**
538
518
* @param InterfaceType $iface
539
519
*
Original file line number Diff line number Diff line change @@ -1562,7 +1562,7 @@ interface SomeInterface {
1562
1562
}
1563
1563
1564
1564
/**
1565
- * @see it('rejects an interface not implemented by at least one object')
1565
+ * @see it('accepts an interface not implemented by at least one object')
1566
1566
*/
1567
1567
public function testRejectsAnInterfaceNotImplementedByAtLeastOneObject ()
1568
1568
{
@@ -1577,11 +1577,7 @@ interface SomeInterface {
1577
1577
' );
1578
1578
$ this ->assertMatchesValidationMessage (
1579
1579
$ schema ->validate (),
1580
- [[
1581
- 'message ' => 'Interface SomeInterface must be implemented by at least one Object type. ' ,
1582
- 'locations ' => [[ 'line ' => 6 , 'column ' => 7 ]],
1583
- ],
1584
- ]
1580
+ []
1585
1581
);
1586
1582
}
1587
1583
You can’t perform that action at this time.
0 commit comments