eshta / fixtures-bundle
Doctrine Persistent Fixtures
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4.0
- doctrine/data-fixtures: ~1.0
- doctrine/orm: v2.5.*
- symfony/console: ~2.5|~3.0
- symfony/framework-bundle: ~2.5|~3.0
Requires (Dev)
- phpunit/phpunit: ~5.1
This package is auto-updated.
Last update: 2024-11-15 21:18:40 UTC
README
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.
Setup
Installation
composer require eshta/fixtures-bundle
// app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { // ... $bundles[] = new Eshta\FixturesBundle\EshtaFixturesBundle(); return $bundles } // ... }
Configuration
Exclude the fixtures log table from DBAL schema
doctrine: dbal: schema_filter: ~^(?!fixtures_log)~
Usage
Help:
app/console eshta:fixtures:load -h
Load:
app/console eshta:fixtures:load
It will load any outstanding fixtures only, it also supports ordering as with the normal fixtures bundle
Load file:
app/console eshta:fixtures:load [--force] <file>
Documentation
checkout doctrine fixtures bundle except for setup, the documentation is the same.