diff --git a/cookbook/serializer.rst b/cookbook/serializer.rst index 2e12c6cf641..93aba022a29 100644 --- a/cookbook/serializer.rst +++ b/cookbook/serializer.rst @@ -124,6 +124,8 @@ Here is an example on how to load the $definition->addTag('serializer.normalizer'); $container->setDefinition('get_set_method_normalizer', $definition); +.. _cookbook-serializer-using-serialization-groups-annotations: + Using Serialization Groups Annotations -------------------------------------- @@ -170,6 +172,8 @@ to your class and choose which groups to use when serializing:: 'json', array('groups' => array('group1') ); +.. _cookbook-serializer-enabling-metadata-cache: + Enabling the Metadata Cache --------------------------- diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 0ef27c453d2..b33d5d515e1 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -92,7 +92,7 @@ Configuration * `validation`_ * :ref:`enabled ` * :ref:`cache ` - * `enable_annotations`_ + * :ref:`enable_annotations ` * `translation_domain`_ * `strict_email`_ * `api`_ @@ -102,6 +102,8 @@ Configuration * `debug`_ * `serializer`_ * :ref:`enabled ` + * :ref:`cache ` + * :ref:`enable_annotations ` secret ~~~~~~ @@ -1372,6 +1374,8 @@ cache The service that is used to persist class metadata in a cache. The service has to implement the :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`. +.. _reference-validation-enable_annotations: + enable_annotations .................. @@ -1478,7 +1482,32 @@ enabled Whether to enable the ``serializer`` service or not in the service container. -For more details, see :doc:`/cookbook/serializer`. +.. _reference-serializer-cache: + +cache +..... + +**type**: ``string`` + +The service that is used to persist class metadata in a cache. The service +has to implement the :class:`Doctrine\\Common\\Cache\\Cache` interface. + +.. seealso:: + + For more information, see :ref:`cookbook-serializer-enabling-metadata-cache`. + +.. _reference-serializer-enable_annotations: + +enable_annotations +.................. + +**type**: ``boolean`` **default**: ``false`` + +If this option is enabled, serialization groups can be defined using annotations. + +.. seealso:: + + For more information, see :ref:`cookbook-serializer-using-serialization-groups-annotations`. Full Default Configuration --------------------------