Simple fixture loader for Doctrine.
Load XML fixtures into database using entity manager.
$ composer require oligus/doctrine-fixtures --dev
Load all fixtures in a directory
$fixture = new FixtureManager($em, new XmlLoader('path/to/fixtures'));
$fixture->loadAll();
Load a single fixture file
$fixture = new FixtureManager($em, new XmlLoader());
$fixture->loadFile('path/to/fixtures/data_table.xml');
- Xml Loader
- Csv Loader
$ mysqldump -h localhost -u username --password=password --xml -t database data_table --where="id='1'"