-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
List CSV encoder's context options #12461
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
Conversation
components/serializer.rst
Outdated
@@ -1254,6 +1247,52 @@ These are the options available: | |||
``remove_empty_tags`` | |||
If set to true, removes all empty tags in the generated XML. | |||
|
|||
The CSV Encoder | |||
--------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should keep the same underline as XML encoder, because the should be on the same hierachy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It already is on the same level, check out the rendered docs: https://pr-12461-6xsc4kq-nq3xa5jtywvyc.eu.s5y.io/components/serializer.html
@javiereguiluz how do we proceed here? It's a bit confusing to have headlines for each encoder... 🤔: And I am unsure if this should go into |
…alarzm) This PR was merged into the 4.4 branch. Discussion ---------- [Serializer][CSV] Add context options to handle BOM | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #33684 | License | MIT | Doc PR | symfony/symfony-docs#12461 This allows BOM handling in en/decoded CSV files. To keep current behaviour intact both skipping BOM at the beginning of the CSV and outputting BOM are an opt-in feature. Personally I'd propose to make `SKIP_INPUT_BOM` default to `false` in 5.0 so the BOM is transparent and people that for some reasons expect BOM characters to be present in the parsed text explicitly opt-out of trimming it. Commits ------- 3eb3668 Add context options to handle BOM
The code is merged, @javiereguiluz can you please give a final review here? Thank you! 🙏 |
Sorry that this PR was open for sooo long @malarzm. Fortunately, it's merged now! Thanks a lot for taking the time to not only document a feature you proposed - but also to document all other available options. |
Glad it got merged :) |
I needed to add new option
output_utf8_bom
introduced in symfony/symfony#33896 and since context options weren't documented I figured I'll list them all. Format and text is based on XML's part of the docs.