@@ -34,6 +34,8 @@ Configuration
3434 * `gc_probability `_
3535 * `gc_maxlifetime `_
3636 * `save_path `_
37+ * `serializer `_
38+ * `enabled `_
3739* `templating `_
3840 * `assets_base_urls `_
3941 * `assets_version `_
@@ -244,6 +246,70 @@ save_path
244246This determines the argument to be passed to the save handler. If you choose
245247the default file handler, this is the path where the files are created.
246248
249+ .. _configuration-framework-serializer :
250+
251+ serializer
252+ ~~~~~~~~~~
253+
254+ enabled
255+ .......
256+
257+ **type **: ``boolean `` **default **: ``false ``
258+
259+ Whether to enable the ``serializer `` service or not in the service container.
260+ If enabled, the ``serializer `` service will be available in the container
261+ and will be loaded with two:ref: `encoders<component-serializer-encoders> `
262+ (:class: `Symfony\\ Component\\ Serializer\\ Encoder\\ JsonEncoder ` and
263+ :class: `Symfony\\ Component\\ Serializer\\ Encoder\\ XmlEncoder `)
264+ but no:ref: `normalizers<component-serializer-normalizers> `, meaning you'll
265+ need to load your own.
266+
267+ You can load normalizers and/or encoders by tagging them as
268+ :ref: `serializer.normalizer<reference-dic-tags-serializer-normalizer> ` and
269+ :ref: `serializer.encoder<reference-dic-tags-serializer-encoder> `. It's also
270+ possible to set the priority of the tag in order to decide the matching order.
271+
272+ Here an example on how to load the load
273+ the:class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ GetSetMethodNormalizer `:
274+
275+ ..configuration-block ::
276+
277+ ..code-block ::yaml
278+
279+ # app/config/config.yml
280+ services :
281+ get_set_method_normalizer :
282+ class :Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
283+ tags :
284+ -{ name: serializer.normalizer }
285+
286+ ..code-block ::xml
287+
288+ <!-- app/config/config.xml-->
289+ <services >
290+ <service id =" get_set_method_normalizer" class =" Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer" >
291+ <tag name =" serializer.normalizer" />
292+ </service >
293+ </services >
294+
295+ ..code-block ::php
296+
297+ // app/config/config.php
298+ use Symfony\Component\DependencyInjection\Definition;
299+
300+ $definition = new Definition(
301+ 'Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer'
302+ ));
303+ $definition->addTag('serializer.normalizer');
304+ $container->setDefinition('get_set_method_normalizer', $definition);
305+
306+ ..note ::
307+
308+ The:class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ GetSetMethodNormalizer `
309+ is broken by design. As soon as you have a circular object graph, an
310+ infinite loop is created when calling the getters. You're encouraged
311+ to add your own normalizers that fit your use-case.
312+
247313templating
248314~~~~~~~~~~
249315
@@ -462,6 +528,10 @@ Full Default Configuration
462528# DEPRECATED! Please use: cookie_httponly
463529httponly :~
464530
531+ # serializer configuration
532+ serializer :
533+ enabled :false
534+
465535# templating configuration
466536templating :
467537assets_version :~