Closed bondjimbond closed 6 years ago
For compound objects, the separator is set at https://github.com/MarcusBarnes/mik/blob/master/src/writers/CsvCompound.php#L51. I have no issue making the defaults consistent, other than changing default behavior can introduce problems. But, as long as we document the change to compound clearly, I'm OK with it. @MarcusBarnes what do you think?
@mjordan It's probably better to make the defaults consistent and document the changes. Maybe we should get in the habit of creating point releases more regularly? That way those using MIK can stick to a specific release tag (unless they need any of the changes introduced).
Sounds good to me. Who wants to open a PR to fix the compound default? I'm happy to.
@mjordan Just reminding you that this issue is still open, since nobody claimed the PR task.
OK, will take a look this weekend.
Working on this, getting tangled up in PHPUnit tests.
I'll open a PR now. I'm also going to mark the testCsvCompoundInputValidator()
test as skipped, since there's obviously something larger going on with the CSV compound and book toolchains. Will open a separate issue for that.
https://github.com/MarcusBarnes/mik/wiki/Toolchain:-CSV-compound-objects updated to note the change in default value.
@mjordan Was it updated? I'm still seeing underscore on the wiki page.
Yeah... should have been more specific there. By "updated" I added the text
Note: As of commit 420ccbb22c461e3aef7ac4fec67c0982681f2de1 (April 24, 2018), the default for this value changed from an underscore (_) to a hyphen (-) to be consistent with the CSV Books and CSV Newspapers toolchains.
But as you can see, I didn't update any of the example instances. Will do that.
@bondjimbond take a look now. Feel free to update any I have missed.
According to the Wiki, the CSV Newspapers and Books likes to have child object sequences denoted with a hyphen and a number:
But CSV Compound's default delimiter is underscore, and needs special configuration to change it:
Can the defaults (i.e. without any configuration) be changed so that they're consistent between toolchains?