Skip to content

Commit 74dbc61

Browse files
authored
Allow serializing DateTimeInterface in date scalars (#2711)
1 parent f6cb9c8 commit 74dbc61

File tree

18 files changed

+73
-94
lines changed

18 files changed

+73
-94
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co
99

1010
## Unreleased
1111

12+
## v6.62.3
13+
14+
### Fixed
15+
16+
- Allow serializing any `DateTimeInterface` instance in date scalars https://github.com/nuwave/lighthouse/pull/2711
17+
1218
## v6.62.2
1319

1420
### Changed

src/Deprecation/DeprecatedUsage.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ class DeprecatedUsage
88
public int $count = 0;
99

1010
public function __construct(
11-
/**
12-
* Why is the element deprecated?
13-
*/
11+
/** Why is the element deprecated? */
1412
public string $reason,
1513
) {}
1614
}

src/Events/BuildSchemaString.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
class BuildSchemaString
1313
{
1414
public function __construct(
15-
/**
16-
* The root schema that was defined by the user.
17-
*/
15+
/** The root schema that was defined by the user. */
1816
public string $userSchema,
1917
) {}
2018
}

src/Events/EndExecution.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ class EndExecution
1414
public Carbon $moment;
1515

1616
public function __construct(
17-
/**
18-
* The result of resolving a single operation.
19-
*/
17+
/** The result of resolving a single operation. */
2018
public ExecutionResult $result,
2119
) {
2220
$this->moment = Carbon::now();

src/Events/EndRequest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ class EndRequest
1919
public Carbon $moment;
2020

2121
public function __construct(
22-
/**
23-
* The response that is about to be sent to the client.
24-
*/
22+
/** The response that is about to be sent to the client. */
2523
public Response $response,
2624
) {
2725
$this->moment = Carbon::now();

src/Events/StartExecution.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,19 @@ class StartExecution
1818
public Carbon $moment;
1919

2020
public function __construct(
21-
/**
22-
* The parsed schema.
23-
*/
21+
/** The parsed schema. */
2422
public Schema $schema,
25-
/**
26-
* The client given parsed query string.
27-
*/
23+
/** The client given parsed query string. */
2824
public DocumentNode $query,
2925
/**
3026
* The client given variables, neither validated nor transformed.
3127
*
3228
* @var array<string, mixed>|null
3329
*/
3430
public ?array $variables,
35-
/**
36-
* The client given operation name.
37-
*/
31+
/** The client given operation name. */
3832
public ?string $operationName,
39-
/**
40-
* The context for the operation.
41-
*/
33+
/** The context for the operation. */
4234
public GraphQLContext $context,
4335
) {
4436
$this->moment = Carbon::now();

src/Events/StartRequest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ class StartRequest
1919
public Carbon $moment;
2020

2121
public function __construct(
22-
/**
23-
* The request sent from the client.
24-
*/
22+
/** The request sent from the client. */
2523
public Request $request,
2624
) {
2725
$this->moment = Carbon::now();

src/Events/ValidateSchema.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
class ValidateSchema
1313
{
1414
public function __construct(
15-
/**
16-
* The final schema to validate.
17-
*/
15+
/** The final schema to validate. */
1816
public Schema $schema,
1917
) {}
2018
}

src/Execution/Arguments/NamedType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ class NamedType
88
public bool $nonNull = false;
99

1010
public function __construct(
11-
/**
12-
* The name of the type as defined in the schema.
13-
*/
11+
/** The name of the type as defined in the schema. */
1412
public string $name,
1513
) {}
1614
}

src/Execution/Arguments/NestedMorphTo.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
class NestedMorphTo implements ArgResolver
1010
{
1111
public function __construct(
12-
/**
13-
* @var \Illuminate\Database\Eloquent\Relations\MorphTo<\Illuminate\Database\Eloquent\Model, \Illuminate\Database\Eloquent\Model> $relation
14-
*/
12+
/** @var \Illuminate\Database\Eloquent\Relations\MorphTo<\Illuminate\Database\Eloquent\Model, \Illuminate\Database\Eloquent\Model> $relation */
1513
protected MorphTo $relation,
1614
) {}
1715

0 commit comments

Comments
 (0)