Skip to content

Commit 2bbeaaa

Browse files
committed
[FrameworkBundle] Update serializer configuration reference
1 parent d7c9085 commit 2bbeaaa

File tree

2 files changed

+45
-12
lines changed

2 files changed

+45
-12
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: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. index::
2-
single: Configuration reference; Framework
2+
single: Configuration reference; Framework
33

44
FrameworkBundle Configuration ("framework")
55
===========================================
@@ -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
~~~~~~
@@ -134,7 +136,7 @@ http_method_override
134136
~~~~~~~~~~~~~~~~~~~~
135137

136138
.. versionadded:: 2.3
137-
The ``http_method_override`` option was introduced in Symfony 2.3.
139+
The ``http_method_override`` option was introduced in Symfony 2.3.
138140

139141
**type**: ``boolean`` **default**: ``true``
140142

@@ -177,7 +179,7 @@ Configures the IP addresses that should be trusted as proxies. For more
177179
details, see :doc:`/cookbook/request/load_balancer_reverse_proxy`.
178180

179181
.. versionadded:: 2.3
180-
CIDR notation support was introduced in Symfony 2.3, so you can whitelist
182+
CIDR notation support was introduced in Symfony 2.3, so you can whitelist
181183
whole subnets (e.g. ``10.0.0.0/8``, ``fc00::/7``).
182184

183185
.. configuration-block::
@@ -226,7 +228,7 @@ using the following keys:
226228
* ``sublime``
227229

228230
.. versionadded:: 2.3.14
229-
The ``emacs`` and ``sublime`` editors were introduced in Symfony 2.3.14.
231+
The ``emacs`` and ``sublime`` editors were introduced in Symfony 2.3.14.
230232

231233
You can also specify a custom url string. If you do this, all percentage
232234
signs (``%``) must be doubled to escape that character. For example, if
@@ -522,7 +524,7 @@ enabled
522524
.......
523525

524526
.. versionadded:: 2.2
525-
The ``enabled`` option was introduced in Symfony 2.2. Prior to Symfony
527+
The ``enabled`` option was introduced in Symfony 2.2. Prior to Symfony
526528
2.2, the profiler could only be disabled by omitting the ``framework.profiler``
527529
configuration entirely.
528530

@@ -542,7 +544,7 @@ collect
542544
.......
543545

544546
.. versionadded:: 2.3
545-
The ``collect`` option was introduced in Symfony 2.3. Previously, when
547+
The ``collect`` option was introduced in Symfony 2.3. Previously, when
546548
``profiler.enabled`` was ``false``, the profiler *was* actually enabled,
547549
but the collectors were disabled. Now, the profiler and the collectors
548550
can be controlled independently.
@@ -1299,7 +1301,7 @@ fallbacks
12991301
**type**: ``string|array`` **default**: ``array('en')``
13001302

13011303
.. versionadded:: 2.3.25
1302-
The ``fallbacks`` option was introduced in Symfony 2.3.25. Prior
1304+
The ``fallbacks`` option was introduced in Symfony 2.3.25. Prior
13031305
to Symfony 2.3.25, it was called ``fallback`` and only allowed one fallback
13041306
language defined as a string. Please note that you can still use the
13051307
old ``fallback`` option if you want define only one fallback.
@@ -1317,7 +1319,7 @@ logging
13171319
.......
13181320

13191321
.. versionadded:: 2.6
1320-
The ``logging`` option was introduced in Symfony 2.6.
1322+
The ``logging`` option was introduced in Symfony 2.6.
13211323

13221324
**default**: ``true`` when the debug mode is enabled, ``false`` otherwise.
13231325

@@ -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

@@ -1391,7 +1395,7 @@ strict_email
13911395
............
13921396

13931397
.. versionadded:: 2.5
1394-
The ``strict_email`` option was introduced in Symfony 2.5.
1398+
The ``strict_email`` option was introduced in Symfony 2.5.
13951399

13961400
**type**: ``Boolean`` **default**: ``false``
13971401

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

14051409
.. versionadded:: 2.5
1406-
The ``api`` option was introduced in Symfony 2.5.
1410+
The ``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)