function AbstractNormalizerContextBuilder::withCircularReferenceLimit
Configures how many loops of circular reference to allow while normalizing.
The value 1 means that when we encounter the same object a second time, we consider that a circular reference.
You can raise this value for special cases, e.g. in combination with the max depth setting of the object normalizer.
Must be strictly positive.
Parameters
positive-int|null $circularReferenceLimit:
File
-
vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php, line 41
Class
- AbstractNormalizerContextBuilder
- A helper providing autocompletion for available AbstractNormalizer options.
Namespace
Symfony\Component\Serializer\Context\NormalizerCode
public function withCircularReferenceLimit(?int $circularReferenceLimit) : static {
return $this->with(AbstractNormalizer::CIRCULAR_REFERENCE_LIMIT, $circularReferenceLimit);
}