Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ai/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following elements are part of the stable public API:

After merging a PR and releasing:

1. Merge the PR via `gh pr merge` (use `--merge` for a merge commit)
1. Merge the PR via `gh pr merge --squash`, or `--rebase` when the commit history is already clean (merge commits are disabled)
2. Pull latest master: `git pull`
3. Update CHANGELOG.md: move the entry from `## Unreleased` into a new versioned section (e.g. `## v15.32.0`), add the PR URL as a reference, leave an empty `## Unreleased` at the top
4. Commit and push the CHANGELOG update to master
Expand All @@ -52,3 +52,4 @@ After merging a PR and releasing:
Version bump rules (semver):
- New feature → minor bump (v15.31.x → v15.32.0)
- Bug fix / change → patch bump (v15.31.x → v15.31.x+1)
- Breaking change → major bump: label the PR `breaking change` and leave it open for the next major release instead of merging
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 on lines +12 to +15
## v15.37.1

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ If your contribution requires significant or breaking changes, or if you plan to
we recommend you to [create an issue](https://github.com/webonyx/graphql-php/issues/new)
with a brief proposal and discuss it with us first.

Breaking changes are collected for the next major release.
Maintainers mark such pull requests with the [`breaking change`](https://github.com/webonyx/graphql-php/labels/breaking%20change) label, which may keep them open for a while.

For smaller contributions use this workflow:

1. Fork the project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'resolve' => function ($rootValue, array $args) {
$deferred = new \React\Promise\Deferred();
$promise = $deferred->promise();
$promise = $promise = $promise->then(static fn (): string => $rootValue['prefix'] . $args['message']);
$promise = $promise->then(static fn (): string => $rootValue['prefix'] . $args['message']);
$deferred->resolve(null);

return $promise;
Expand Down
1 change: 1 addition & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
__DIR__ . '/src/Type/Definition/CustomScalarType.php', // Refines PHPDoc types
],
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
Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector::class, // Prefer self::
Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector::class => [
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;

/**
* 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;

/** 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;

/**
* 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;

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