You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #6926 [Serializer] Add information about name converter parameter (michaelperrin)
This PR was merged into the 2.8 branch.
Discussion
----------
[Serializer] Add information about name converter parameter
The `name_converter` option for the Serializer component configuration is only documented in the [configuration reference](http://symfony.com/doc/current/reference/configuration/framework.html#name-converter).
It is not visible when reading the Serializer [How to use](http://symfony.com/doc/current/serializer.html) chapter, which makes difficult to find this option (hence an issue like this: https://github.com/symfony/symfony-standard/issues/902).
Should I mention that the option was added in Symfony 2.8 (something that is not mentioned in the Configuration reference)?
Commits
-------
299ac85 [Serializer] Add information about name converter parameter
Copy file name to clipboardExpand all lines: serializer.rst
+35
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,41 @@ A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in.
226
226
),
227
227
));
228
228
229
+
Enabling a name converter
230
+
-------------------------
231
+
232
+
The use of a :ref:`name converter <component-serializer-converting-property-names-when-serializing-and-deserializing>` service can be defined in the configuration using the `name_converter` serializer parameter.
233
+
234
+
The built-in :ref:`CamelCase to snake_case name converter <using-camelized-method-names-for-underscored-attributes>` can be enabled by using the `serializer.name_converter.camel_case_to_snake_case` value:
0 commit comments