Skip to content

[Serializer] Enable annotations by default #7491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@ it in your configuration:
# app/config/config.yml
framework:
# ...
serializer:
enabled: true
serializer: { enable_annotations: true }
# Alternatively, if you don't want to use annotations
#serializer: { enabled: true }

.. code-block:: xml

<!-- app/config/config.xml -->
<framework:config>
<!-- ... -->
<framework:serializer enable-annotations="true" />
<!--
Alternatively, if you don't want to use annotations
<framework:serializer enabled="true" />
-->
</framework:config>

.. code-block:: php
Expand All @@ -46,6 +51,8 @@ it in your configuration:
$container->loadFromExtension('framework', array(
// ...
'serializer' => array(
'enable_annotations' => true,
// Alternatively, if you don't want to use annotations
'enabled' => true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be commented too

),
));
Expand Down