Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27df508

Browse files
committed
feature#7633 [FrameworkBundle][Serializer] Add new framework bundle option to reference: circular_reference_handler (Nek-)
This PR was merged into the master branch.Discussion----------[FrameworkBundle][Serializer] Add new framework bundle option to reference: circular_reference_handlerThis PR provides documentation for this other PRsymfony/symfony#22011It should not be merged before the related Symfony PR is merged.It also fixes missing options in the example YAML config file.Commits-------964c31e Add new framework bundle option to reference: circular_reference_handler
2 parentsdbb812a +964c31e commit27df508

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

‎components/serializer.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ with the serializer enabled.
587587
..versionadded::3.2
588588
The ``YamlEncoder`` and ``CsvEncoder`` encoders were introduced in Symfony 3.2
589589

590+
.. _component-serializer-handling-circular-references:
591+
590592
Handling Circular References
591593
----------------------------
592594

‎reference/configuration/framework.rst‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Configuration
104104
*:ref:`cache<reference-serializer-cache>`
105105
*:ref:`enable_annotations<reference-serializer-enable_annotations>`
106106
*:ref:`name_converter<reference-serializer-name_converter>`
107+
*:ref:`circular_reference_handler<reference-serializer-circular_reference_handler>`
107108
* `php_errors`_
108109
* `log`_
109110
* `throw`_
@@ -1481,6 +1482,20 @@ value.
14811482
For more information, see
14821483
:ref:`component-serializer-converting-property-names-when-serializing-and-deserializing`.
14831484

1485+
.. _reference-serializer-circular_reference_handler:
1486+
1487+
circular_reference_handler
1488+
..........................
1489+
1490+
**type** ``string``
1491+
1492+
The service id that is used as circular reference handler of the default serializer. The
1493+
service has to implement the ``__invoke($object)`` method.
1494+
1495+
..seealso::
1496+
For more information, see
1497+
:ref:`component-serializer-handling-circular-references`.
1498+
14841499
php_errors
14851500
~~~~~~~~~~
14861501

@@ -1610,7 +1625,10 @@ Full Default Configuration
16101625
16111626
# serializer configuration
16121627
serializer:
1613-
enabled:false
1628+
enabled:false
1629+
cache:~
1630+
name_converter:~
1631+
circular_reference_handler:~
16141632
16151633
# assets configuration
16161634
assets:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp