Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle][Serializer] Add new framework bundle option to reference: circular_reference_handler #7633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------------

Expand Down
20 changes: 19 additions & 1 deletion reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Configuration
* :ref:`cache <reference-serializer-cache>`
* :ref:`enable_annotations <reference-serializer-enable_annotations>`
* :ref:`name_converter <reference-serializer-name_converter>`
* :ref:`circular_reference_handler <reference-serializer-circular_reference_handler>`
* `php_errors`_
* `log`_
* `throw`_
Expand Down Expand Up @@ -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
~~~~~~~~~~

Expand Down Expand Up @@ -1610,7 +1625,10 @@ Full Default Configuration

# serializer configuration
serializer:
enabled: false
enabled: false
cache: ~
name_converter: ~
circular_reference_handler: ~

# assets configuration
assets:
Expand Down