From 964c31ea9ecaf2891b0da4ead4e60e481c331984 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Wed, 15 Mar 2017 21:18:34 +0100 Subject: [PATCH] Add new framework bundle option to reference: circular_reference_handler This is added by https://github.com/symfony/symfony/pull/22011 This commit also fix missing serializer related missing options in the yaml config example. --- components/serializer.rst | 2 ++ reference/configuration/framework.rst | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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: