Was wondering if there is an easy to convert structured files into YAML data fixtures for Doctrine / Symfony.
I don’t see any utility with Doctrine to accept CSV.
I might just start writing something simple to do this. Is it worthwhile?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I wrote my own Macro to solve this problem & shared it. You can specify the fields in your model, fill-out the data and the YAML is generated.
The best part is that it supports Nested Data as well (based on NestedSet Doctrine Behaviour)
You can download the file from here:
http://www.prasadgupte.com/go/converting-csvexcel-data-to-doctrine-yaml-fixtures/
Hope this helps!