diff --git a/components/serializer.rst b/components/serializer.rst index 0ae72c6556b..4bbc8cb27a7 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -591,6 +591,8 @@ with the serializer enabled. .. versionadded:: 3.2 The ``YamlEncoder`` and ``CsvEncoder`` encoders were introduced in Symfony 3.2 +.. _component-serializer-handling-circular-references: + Handling Circular References ---------------------------- diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 4d75d9539f2..9912f778059 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -104,6 +104,7 @@ Configuration * :ref:`cache ` * :ref:`enable_annotations ` * :ref:`name_converter ` + * :ref:`circular_reference_handler ` * `php_errors`_ * `log`_ * `throw`_ @@ -1481,6 +1482,20 @@ value. For more information, see :ref:`component-serializer-converting-property-names-when-serializing-and-deserializing`. +.. _reference-serializer-circular_reference_handler: + +circular_reference_handler +.......................... + +**type** ``string`` + +The service id that is used as circular reference handler of the default serializer. The +service has to implement the ``__invoke($object)`` method. + +.. seealso:: + For more information, see + :ref:`component-serializer-handling-circular-references`. + php_errors ~~~~~~~~~~ @@ -1610,7 +1625,10 @@ Full Default Configuration # serializer configuration serializer: - enabled: false + enabled: false + cache: ~ + name_converter: ~ + circular_reference_handler: ~ # assets configuration assets: