Skip to content

Commit 588689a

Browse files
committed
[FrameworkBundle] Update serializer configuration reference
1 parent d7c9085 commit 588689a

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

cookbook/serializer.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ Here is an example on how to load the
124124
$definition->addTag('serializer.normalizer');
125125
$container->setDefinition('get_set_method_normalizer', $definition);
126126
127+
.. _cookbook-serializer-using-serialization-groups-annotations:
128+
127129
Using Serialization Groups Annotations
128130
--------------------------------------
129131

@@ -170,6 +172,8 @@ to your class and choose which groups to use when serializing::
170172
'json', array('groups' => array('group1')
171173
);
172174

175+
.. _cookbook-serializer-enabling-metadata-cache:
176+
173177
Enabling the Metadata Cache
174178
---------------------------
175179

reference/configuration/framework.rst

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Configuration
9292
* `validation`_
9393
* :ref:`enabled <reference-validation-enabled>`
9494
* :ref:`cache <reference-validation-cache>`
95-
* `enable_annotations`_
95+
* :ref:`enable_annotations <reference-validation-enable_annotations>`
9696
* `translation_domain`_
9797
* `strict_email`_
9898
* `api`_
@@ -102,6 +102,8 @@ Configuration
102102
* `debug`_
103103
* `serializer`_
104104
* :ref:`enabled <reference-serializer-enabled>`
105+
* :ref:`cache <reference-serializer-cache>`
106+
* :ref:`enable_annotations <reference-serializer-enable_annotations>`
105107

106108
secret
107109
~~~~~~
@@ -1372,6 +1374,8 @@ cache
13721374
The service that is used to persist class metadata in a cache. The service
13731375
has to implement the :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`.
13741376

1377+
.. _reference-validation-enable_annotations:
1378+
13751379
enable_annotations
13761380
..................
13771381

@@ -1403,7 +1407,7 @@ api
14031407
...
14041408

14051409
.. versionadded:: 2.5
1406-
The ``api`` option was introduced in Symfony 2.5.
1410+
T he ``api`` option was introduced in Symfony 2.5.
14071411

14081412
**type**: ``string``
14091413

@@ -1478,7 +1482,32 @@ enabled
14781482

14791483
Whether to enable the ``serializer`` service or not in the service container.
14801484

1481-
For more details, see :doc:`/cookbook/serializer`.
1485+
.. _reference-serializer-cache:
1486+
1487+
cache
1488+
.....
1489+
1490+
**type**: ``string``
1491+
1492+
The service that is used to persist class metadata in a cache. The service
1493+
has to implement the :class:`Doctrine\\Common\\Cache\\Cache` interface.
1494+
1495+
.. seealso::
1496+
1497+
For more information, see :ref:`cookbook-serializer-enabling-metadata-cache`.
1498+
1499+
.. _reference-serializer-enable_annotations:
1500+
1501+
enable_annotations
1502+
..................
1503+
1504+
**type**: ``boolean`` **default**: ``false``
1505+
1506+
If this option is enabled, serialization groups can be defined using annotations.
1507+
1508+
.. seealso::
1509+
1510+
For more information, see :ref:`cookbook-serializer-using-serialization-groups-annotations`.
14821511

14831512
Full Default Configuration
14841513
--------------------------

0 commit comments

Comments
 (0)