File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ CHANGELOG
33
44[ Next release] ( https://github.com/rebing/graphql-laravel/compare/9.11.0...master )
55
6+ ### Fixed
7+ - Fixed type declaration mismatch in scalar type classes generated by ` make:graphql:scalar ` command by removing premature type hints from the stub [ \# 1190 / iisyos] ( https://github.com/rebing/graphql-laravel/pull/1190 )
8+
692025-10-07, 9.11.0
710------------------
811
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ class DummyClass extends ScalarType implements TypeConvertible
1616 /**
1717 * @var string
1818 */
19- public $name = 'DummyClass';
19+ public string $name = 'DummyClass';
2020
2121 /**
22- * @var string
22+ * @var ? string
2323 */
24- public $description = '';
24+ public ?string $description = '';
2525
2626 /**
2727 * Serializes an internal value to include in a response.
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ public static function dataForMakeCommand(): array
3737 'inputName ' => 'Example ' ,
3838 'expectedFilename ' => 'GraphQL/Scalars/Example.php ' ,
3939 'expectedClassDefinition ' => 'Example extends ScalarType implements TypeConvertible ' ,
40- 'expectedGraphqlName ' => '\$name = \'Example \'; ' ,
40+ 'expectedGraphqlName ' => 'public string \ \$name = \'Example \'; ' ,
4141 ],
4242 'ExampleScalar ' => [
4343 'inputName ' => 'ExampleScalar ' ,
4444 'expectedFilename ' => 'GraphQL/Scalars/ExampleScalar.php ' ,
4545 'expectedClassDefinition ' => 'ExampleScalar extends ScalarType implements TypeConvertible ' ,
46- 'expectedGraphqlName ' => '\$name = \'ExampleScalar \'; ' ,
46+ 'expectedGraphqlName ' => 'public string \ \$name = \'ExampleScalar \'; ' ,
4747 ],
4848 ];
4949 }
You can’t perform that action at this time.
0 commit comments