@@ -1064,30 +1064,35 @@ which defines the configuration options for the CsvEncoder an associative array:
1064
1064
1065
1065
These are the options available:
1066
1066
1067
- ======================= ===================================================== ==========================
1068
- Option Description Default
1069
- ======================= ===================================================== ==========================
1070
- ``csv_delimiter `` Sets the field delimiter separating values (one ``, ``
1067
+ ======================= ============================================================= ==========================
1068
+ Option Description Default
1069
+ ======================= ============================================================= ==========================
1070
+ ``csv_delimiter `` Sets the field delimiter separating values (one ``, ``
1071
1071
character only)
1072
- ``csv_enclosure `` Sets the field enclosure (one character only) ``" ``
1073
- ``csv_end_of_line `` Sets the character(s) used to mark the end of each ``\n ``
1072
+ ``csv_enclosure `` Sets the field enclosure (one character only) ``" ``
1073
+ ``csv_end_of_line `` Sets the character(s) used to mark the end of each ``\n ``
1074
1074
line in the CSV file
1075
- ``csv_escape_char `` Sets the escape character (at most one character) empty string
1076
- ``csv_key_separator `` Sets the separator for array's keys during its ``. ``
1075
+ ``csv_escape_char `` Deprecated. Sets the escape character (at most one character) empty string
1076
+ ``csv_key_separator `` Sets the separator for array's keys during its ``. ``
1077
1077
flattening
1078
1078
``csv_headers `` Sets the order of the header and data columns
1079
1079
E.g.: if ``$data = ['c' => 3, 'a' => 1, 'b' => 2] ``
1080
1080
and ``$options = ['csv_headers' => ['a', 'b', 'c']] ``
1081
1081
then ``serialize($data, 'csv', $options) `` returns
1082
- ``a,b,c\n1,2,3 `` ``[] ``, inferred from input data's keys
1083
- ``csv_escape_formulas `` Escapes fields containing formulas by prepending them ``false ``
1082
+ ``a,b,c\n1,2,3 `` ``[] ``, inferred from input data's keys
1083
+ ``csv_escape_formulas `` Escapes fields containing formulas by prepending them ``false ``
1084
1084
with a ``\t `` character
1085
- ``as_collection `` Always returns results as a collection, even if only ``true ``
1085
+ ``as_collection `` Always returns results as a collection, even if only ``true ``
1086
1086
one line is decoded.
1087
- ``no_headers `` Setting to ``false `` will use first row as headers. ``false ``
1087
+ ``no_headers `` Setting to ``false `` will use first row as headers. ``false ``
1088
1088
``true `` generate numeric headers.
1089
- ``output_utf8_bom `` Outputs special `UTF-8 BOM `_ along with encoded data ``false ``
1090
- ======================= ===================================================== ==========================
1089
+ ``output_utf8_bom `` Outputs special `UTF-8 BOM `_ along with encoded data ``false ``
1090
+ ======================= ============================================================= ==========================
1091
+
1092
+ .. deprecated :: 7.2
1093
+
1094
+ The ``csv_escape_char `` option and the ``CsvEncoder::ESCAPE_CHAR_KEY ``
1095
+ constant were deprecated in Symfony 7.2.
1091
1096
1092
1097
The ``XmlEncoder ``
1093
1098
~~~~~~~~~~~~~~~~~~
@@ -1304,6 +1309,11 @@ you can use "context builders" to define the context using a fluent interface::
1304
1309
You can also :doc: `create custom context builders </serializer/custom_context_builders >`
1305
1310
to deal with your context values.
1306
1311
1312
+ .. deprecated :: 7.2
1313
+
1314
+ The ``CsvEncoderContextBuilder::withEscapeChar() `` method was deprecated
1315
+ in Symfony 7.2.
1316
+
1307
1317
Skipping ``null `` Values
1308
1318
------------------------
1309
1319
0 commit comments