Based on doctrine fixtures, similar to doctrine data fixtures bundle, but it persists fixtures instead, so it detects if a certain fixture is loaded it will not load it like doctrine migrations, best used as a place for seeded data.
composer require eshta/fixtures-bundle
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
// ...
$bundles[] = new Eshta\FixturesBundle\EshtaFixturesBundle();
return $bundles
}
// ...
}
Exclude the fixtures log table from DBAL schema
doctrine:
dbal:
schema_filter: ~^(?!fixtures_log)~
app/console eshta:fixtures:load -h
app/console eshta:fixtures:load
It will load any outstanding fixtures only, it also supports ordering as with the normal fixtures bundle
app/console eshta:fixtures:load [--force] <file>
checkout doctrine fixtures bundle except for setup, the documentation is the same.