diff --git a/composer.json b/composer.json index 71b7fe7cc..9eb39d04b 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "amphp/http-server": "^2.1", "dms/phpunit-arraysubset-asserts": "dev-master", "ergebnis/composer-normalize": "^2.28", - "friendsofphp/php-cs-fixer": "3.91.1", + "friendsofphp/php-cs-fixer": "3.91.2", "mll-lab/php-cs-fixer-config": "5.11.0", "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", diff --git a/src/Error/Error.php b/src/Error/Error.php index 82d20a421..e0bcb65e4 100644 --- a/src/Error/Error.php +++ b/src/Error/Error.php @@ -22,7 +22,7 @@ * * @see \GraphQL\Tests\Error\ErrorTest */ -class Error extends \Exception implements \JsonSerializable, ClientAware, ProvidesExtensions +class Error extends \Exception implements \Stringable, \JsonSerializable, ClientAware, ProvidesExtensions { /** * Lazily initialized. diff --git a/src/Language/AST/Node.php b/src/Language/AST/Node.php index 6a5d056db..35cac6850 100644 --- a/src/Language/AST/Node.php +++ b/src/Language/AST/Node.php @@ -31,7 +31,7 @@ * * @see \GraphQL\Tests\Language\AST\NodeTest */ -abstract class Node implements \JsonSerializable +abstract class Node implements \Stringable, \JsonSerializable { public ?Location $loc = null; diff --git a/src/Type/Definition/Type.php b/src/Type/Definition/Type.php index 8dee72b8d..9503848ee 100644 --- a/src/Type/Definition/Type.php +++ b/src/Type/Definition/Type.php @@ -9,7 +9,7 @@ /** * Registry of standard GraphQL types and base class for all other types. */ -abstract class Type implements \JsonSerializable +abstract class Type implements \Stringable, \JsonSerializable { public const INT = 'Int'; public const FLOAT = 'Float'; diff --git a/tests/Type/ScalarSerializationTest.php b/tests/Type/ScalarSerializationTest.php index afaf9e740..8221c9a45 100644 --- a/tests/Type/ScalarSerializationTest.php +++ b/tests/Type/ScalarSerializationTest.php @@ -111,7 +111,7 @@ public function testSerializesOutputAsString(): void self::assertSame('1', $stringType->serialize(true)); self::assertSame('', $stringType->serialize(false)); self::assertSame('', $stringType->serialize(null)); - self::assertSame('foo', $stringType->serialize(new class() { + self::assertSame('foo', $stringType->serialize(new class() implements \Stringable { public function __toString(): string { return 'foo'; diff --git a/tests/Type/TestClasses/ObjectIdStub.php b/tests/Type/TestClasses/ObjectIdStub.php index 1d3cc43a2..1c6b6d75c 100644 --- a/tests/Type/TestClasses/ObjectIdStub.php +++ b/tests/Type/TestClasses/ObjectIdStub.php @@ -2,7 +2,7 @@ namespace GraphQL\Tests\Type\TestClasses; -final class ObjectIdStub +final class ObjectIdStub implements \Stringable { private int $id;