excelcsvsymfony1doctrineyaml

Convert from Database / Excel / CSV to YAML data fixtures?


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?


Solution

  • 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!