Skip to content

Commit 91b25d7

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: document serializer default_context
2 parents 425563d + 23d8fc6 commit 91b25d7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

reference/configuration/framework.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,6 +2743,19 @@ paths
27432743
This option allows to define an array of paths with files or directories where
27442744
the component will look for additional serialization files.
27452745

2746+
default_context
2747+
...............
2748+
2749+
**type**: ``array`` **default**: ``[]``
2750+
2751+
A map with default context options that will be used with each ``serialize`` and ``deserialize``
2752+
call. This can be used for example to set the json encoding behavior by setting ``json_encode_options``
2753+
to a `json_encode flags bitmask`_.
2754+
2755+
.. versionadded:: 5.4
2756+
2757+
The ``default_context`` parameter was introduced in Symfony 5.4.
2758+
27462759
php_errors
27472760
~~~~~~~~~~
27482761

@@ -3573,6 +3586,7 @@ use the configuration of the first exception that matches ``instanceof``:
35733586
.. _`blue/green deployment`: https://martinfowler.com/bliki/BlueGreenDeployment.html
35743587
.. _`gulp-rev`: https://www.npmjs.com/package/gulp-rev
35753588
.. _`webpack-manifest-plugin`: https://www.npmjs.com/package/webpack-manifest-plugin
3589+
.. _`json_encode flags bitmask`: https://www.php.net/json_encode
35763590
.. _`error_reporting PHP option`: https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
35773591
.. _`CSRF security attacks`: https://en.wikipedia.org/wiki/Cross-site_request_forgery
35783592
.. _`session.sid_length PHP option`: https://www.php.net/manual/session.configuration.php#ini.session.sid-length

0 commit comments

Comments
 (0)