Skip to content

Commit e4f45dc

Browse files
committed
Merge branch '2.4'
2 parents 8d625d0 + 96bfc4d commit e4f45dc

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@
1212
* GraphQL: Allow to use a search and an exist filter on the same resource
1313
* GraphQL: Refactor the architecture of the whole system to allow the decoration of useful services (`TypeConverter` to manage custom types, `SerializerContextBuilder` to modify the (de)serialization context dynamically, etc.)
1414

15+
## 2.4.6
16+
17+
* GraphQL: Use correct resource configuration for filter arguments of nested collection
18+
* Swagger UI: compatibility with Internet Explorer 11
19+
* Varnish: Prevent cache miss by generating IRI for child related resources
20+
* Messenger: Unwrap exception thrown in handler for Symfony Messenger 4.3
21+
* Fix remaining Symfony 4.3 deprecation notices
22+
* Prevent cloning non clonable objects in `previous_data`
23+
* Return a 415 HTTP status code instead of a 406 one when a faulty `Content-Type` is sent
24+
* Fix `WriteListener` trying to generate IRI for non-resources
25+
* Allow to extract blank values from composite identifier
26+
1527
## 2.4.5
1628

1729
* Fix denormalization of a constructor argument which is a collection of non-resources

src/GraphQl/Resolver/Factory/ItemResolverFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use ApiPlatform\Core\GraphQl\Resolver\Stage\SerializeStageInterface;
2020
use ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface;
2121
use ApiPlatform\Core\Util\ClassInfoTrait;
22+
use ApiPlatform\Core\Util\CloneTrait;
2223
use GraphQL\Error\Error;
2324
use GraphQL\Type\Definition\ResolveInfo;
2425
use Psr\Container\ContainerInterface;
@@ -33,6 +34,7 @@
3334
*/
3435
final class ItemResolverFactory implements ResolverFactoryInterface
3536
{
37+
use CloneTrait;
3638
use ClassInfoTrait;
3739

3840
private $readStage;
@@ -80,7 +82,7 @@ public function __invoke(?string $resourceClass = null, ?string $rootClass = nul
8082
($this->denyAccessStage)($resourceClass, $operationName, $resolverContext + [
8183
'extra_variables' => [
8284
'object' => $item,
83-
'previous_object' => \is_object($item) ? clone $item : $item,
85+
'previous_object' => $this->clone($item),
8486
],
8587
]);
8688

0 commit comments

Comments
 (0)