Closed ujovlado closed 6 years ago
I would expect manually typed data dir here:
because we expect that manifest manager writes to known path (same as passed to constuctor).
And since it's not as I'm writing, tests still passed: https://travis-ci.org/keboola/php-component/builds/353194284
Thx for failing test. You are right.
Generally this was caused by the fact that I modeled everything along the python application. That behaved this way - requiring you to pass full path when writing manifest. After few rounds of reviews it didn't resemble it that much, but some parts stayed the same.
No problem :) I was only confused a bit, because provided dataDir
wasn't used.
What do you think about the BC compatible solution in previous commit? Or should I just grab the opportunity to polish the API with new major version?
It's up to you, but I think the latter is better. Imho, It should not behave differently when I pass absolute path. Also, it can cause confusion, because these two examples will do the same thing:
$mm = new Manager('/data-dir');
$mm->writeMf('/data-dir/out/tables/xyz.manifest');
$mm = new Manager('/data-dir');
$mm->writeMf('xyz.manifest');
And first is a little wtf for me, since I don't know why Manager needs data-dir if it won't use it.
And it looks like manifest file is written to path where script is executed. Shouldn't be written to
$outputPath . '/out/tables'
?