Remove spoon implementation for backend csv#2687
Remove spoon implementation for backend csv#2687Senjutsuu wants to merge 8 commits intoforkcms:masterfrom
Conversation
322c2ed to
046a559
Compare
src/Backend/Core/Engine/Csv.php
Outdated
| ); | ||
| } | ||
|
|
||
| // we are not using the line ending for now. |
There was a problem hiding this comment.
Not sure if it's safe to drop this feature? Will all software handling csv's on multiple OS'es still be able to handle this?
There was a problem hiding this comment.
@WouterSioen Symfony's CSV encoder uses fputcsv to write CSV files so I assume it relies on PHP to properly detect the correct line endings (no mentions of line endings anywhere in the encoder itself). Not too sure if that's a good idea, though.
@Senjutsuu can you test on some different machines (OS X, Windows (with Excel), ...) to see if the CSV encoder always write readable files?
If it doesn't we could look at a CSV generating package on packagist.
There was a problem hiding this comment.
@WouterSioen I did a export on a windows pc and opened it with excel without any problems.
But at this point I do not have any documentation on how the line endings work for Symfony, only that it might be auto detected. Do you have any further thoughts about this issue?
Should we consider other options or go with this?
There was a problem hiding this comment.
If it works, it's definitely better than what it was before, so let's ![]()
There was a problem hiding this comment.
SpoonFileCSV has some additional public methods that are missing here:
- arrayToFile
- arrayToString
- escapeEnclosure
- fileToArray
- stringToArray
These are all still missing in this implementation
|
I would use https://csv.thephpleague.com instead |
|
replaced by #3160 |
Type
Resolves the following issues
fixes #2099
Pull request description
This pull request will no longer implement spoon library for CSV handling in Backend/Core/Engine/Csv.
Instead we will use the Symfony CSV-encoder and serializer.