8000 [Serializer] It must possible to configure to keys to exclude for the… · symfony/symfony@981b57a · GitHub
[go: up one dir, main page]

Skip to content

Commit 981b57a

Browse files
committed
[Serializer] It must possible to configure to keys to exclude for the cache key computation
1 parent 38cbcc6 commit 981b57a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory
115115
throw new InvalidArgumentException(sprintf('The "%s" given in the default context is not callable.', self::MAX_DEPTH_HANDLER));
116116
}
117117

118-
$this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] = [self::CIRCULAR_REFERENCE_LIMIT_COUNTERS];
118+
$this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] = array_merge($this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] ?? [], [self::CIRCULAR_REFERENCE_LIMIT_COUNTERS]);
119119

120120
$this->propertyTypeExtractor = $propertyTypeExtractor;
121121

0 commit comments

Comments
 (0)
0