Skip to content

Commit 6e75399

Browse files
authored
Merge pull request #4929 from soyuka/main
Merge 2.7
2 parents c152348 + 4a5122a commit 6e75399

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ Doctrine: new interfaces for Filters and Extensions ready, switch to the `ApiPla
183183
* feat(test): add `Client::loginUser()` (#4588)
184184
* feat(http_cache): use symfony/http-client instead of guzzlehttp/guzzle, `ApiPlatform\Core\HttpCache\PurgerInterface` is deprecated in favor of `ApiPlatform\HttpCache\PurgerInterface`, new purger that uses PURGE (#4695)
185185

186+
## 2.6.9
187+
188+
* fix(serializer): remove 'iri' from context cache (#4925)
189+
186190
## 2.6.8
187191

188192
* fix: serializing embedded non resource objects

src/Documentation/Action/DocumentationAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __invoke(Request $request = null): DocumentationInterface
4040
$request->attributes->set('_api_normalization_context', $request->attributes->get('_api_normalization_context', []) + $context);
4141
}
4242

43-
if ('json' === $request->getRequestFormat() && null !== $this->openApiFactory) {
43+
if ('json' === $request?->getRequestFormat() && null !== $this->openApiFactory) {
4444
return $this->openApiFactory->__invoke($context ?? []);
4545
}
4646

src/Serializer/ItemNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class ItemNormalizer extends AbstractItemNormalizer
3737
{
3838
private readonly LoggerInterface $logger;
3939

40-
public function __construct(PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, IriConverterInterface $iriConverter, ResourceClassResolverInterface $resourceClassResolver, PropertyAccessorInterface $propertyAccessor = null, NameConverterInterface $nameConverter = null, ClassMetadataFactoryInterface $classMetadataFactory = null, LoggerInterface $logger = null, ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory = null, ResourceAccessCheckerInterface $resourceAccessChecker = null)
40+
public function __construct(PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, IriConverterInterface $iriConverter, ResourceClassResolverInterface $resourceClassResolver, PropertyAccessorInterface $propertyAccessor = null, NameConverterInterface $nameConverter = null, ClassMetadataFactoryInterface $classMetadataFactory = null, LoggerInterface $logger = null, ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory = null, ResourceAccessCheckerInterface $resourceAccessChecker = null, array $defaultContext = [])
4141
{
42-
parent::__construct($propertyNameCollectionFactory, $propertyMetadataFactory, $iriConverter, $resourceClassResolver, $propertyAccessor, $nameConverter, $classMetadataFactory, [], $resourceMetadataFactory, $resourceAccessChecker);
42+
parent::__construct($propertyNameCollectionFactory, $propertyMetadataFactory, $iriConverter, $resourceClassResolver, $propertyAccessor, $nameConverter, $classMetadataFactory, $defaultContext, $resourceMetadataFactory, $resourceAccessChecker);
4343

4444
$this->logger = $logger ?: new NullLogger();
4545
}

0 commit comments

Comments
 (0)