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
MappingItemConverter #266
Comments
I'm sorry about my ignorance of this. Since I'm using Symfony, what I'm doing most of the time, is using symfony-bundles with composer. I'm not too aware of all this stuff. It seems, the bundle is not fetching the actual master branch. Is there any need of that symfony bundle at all? Or is it easily possible without? Thank you in advance :) |
Hey, yes the bundle is currently not compatible with the current master branch. But there are good new for you, you don't need the bundle. $reader = new Reader\DbalReader($conn, 'SELECT * FROM users');
$writer = new Writer\CsvWriter(';', '"', fopen(__DIR__.'/test.csv', 'a+'));
$mapping = new Step\MappingStep();
$mapping->map('first_name', 'firstname');
$mapping->map('last_name', 'lastname');
$filter = new Step\FilterStep();
$filter->add(function($) { return $v['lastname'] !== 'Admin'; });
$workflow = new new Workflow\StepAggregator($reader);
$workflow->addStep($mapping);
$workflow->addStep($filter);
$workflow->addWriter($writer);
$workflow->process(); |
Thank you very much. Got it working now. There's one thing which is not clear to me. Why do I have to write the mapping with brackets like this: Another thing which concerns me. Do you consider working with the master branch safe or should I stick with the stable? Alltough there's no Step there yet. |
@Nexotap This by design, sorry i missed that 😢 . To you second question: Generally i doesn't recommend to rely on the master branch, because if we change something on the core, your app will break. |
@Baachi Don't worry, you are forgiven 😏. I'll still use the master branch, since I like Step stuff. Anyway, thank you alot for the help and who knows, maybe the time comes I can help out in one other another way. |
I posted the same in data-import-bundle. But that bundle looks quite abandoned. So here it again.
I'm trying to use MappingItemConverter. But I cant find it somewhere in the source. Can someone enlighten me, please?
The text was updated successfully, but these errors were encountered: