Skip to content
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ You can find and compare releases at the [GitHub release page](https://github.co

## Unreleased

### Changed

- Remove default values from public properties that are always assigned in the constructor https://github.com/webonyx/graphql-php/pull/1959

Comment thread
spawnia marked this conversation as resolved.
## v15.37.2

### Changed
Expand Down
1 change: 0 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Rector\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector::class => [
__DIR__ . '/src/Type/Definition/CustomScalarType.php', // Refines PHPDoc types
],
Rector\DeadCode\Rector\Property\RemoveDefaultValueFromAssignedPropertyRector::class, // TODO reintroduce in v16 https://github.com/webonyx/graphql-php/pull/1959 - dropping defaults from public properties breaks reading them when the constructor is bypassed
Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector::class, // TODO reintroduce when https://github.com/rectorphp/rector-src/pull/4491 is released
Rector\DeadCode\Rector\StmtsAwareInterface\RemoveDeadInstanceOfAssertRector::class, // Sometimes necessary to prove runtime behavior matches defined types
Rector\PHPUnit\CodeQuality\Rector\Class_\NarrowUnusedSetUpDefinedPropertyRector::class, // Sometimes nicer for symmetry
Expand Down
6 changes: 3 additions & 3 deletions src/Executor/ExecutionResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ExecutionResult implements \JsonSerializable
*
* @var array<string, mixed>|null
*/
public ?array $data = null;
public ?array $data;
Comment thread
spawnia marked this conversation as resolved.

/**
* Errors registered during query execution.
Expand All @@ -52,7 +52,7 @@ class ExecutionResult implements \JsonSerializable
*
* @var list<Error>
*/
public array $errors = [];
public array $errors;

/**
* User-defined serializable array of extensions included in serialized result.
Expand All @@ -61,7 +61,7 @@ class ExecutionResult implements \JsonSerializable
*
* @var array<string, mixed>|null
*/
public ?array $extensions = null;
public ?array $extensions;

/**
* @var callable|null
Expand Down
6 changes: 3 additions & 3 deletions src/Language/AST/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class Location
public int $end;

/** The Token at which this Node begins. */
public ?Token $startToken = null;
public ?Token $startToken;
Comment thread
spawnia marked this conversation as resolved.

/** The Token at which this Node ends. */
public ?Token $endToken = null;
public ?Token $endToken;

/** The Source document the AST represents. */
public ?Source $source = null;
public ?Source $source;

public static function create(int $start, int $end): self
{
Expand Down
4 changes: 2 additions & 2 deletions src/Type/Definition/ResolveInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ResolveInfo
*
* @var array<string, FragmentDefinitionNode>
*/
public array $fragments = [];
public array $fragments;
Comment thread
spawnia marked this conversation as resolved.

/**
* Root value passed to query execution.
Expand All @@ -123,7 +123,7 @@ class ResolveInfo
*
* @var array<string, mixed>
*/
public array $variableValues = [];
public array $variableValues;

/**
* @param \ArrayObject<int, FieldNode> $fieldNodes
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Schema
public ?SchemaDefinitionNode $astNode;

/** @var array<SchemaExtensionNode> */
public array $extensionASTNodes = [];
public array $extensionASTNodes;
Comment thread
spawnia marked this conversation as resolved.

/**
* @param SchemaConfig|array<string, mixed> $config
Expand Down
Loading