dev-master
9999999-devDoctrine DataFixtures CLI command
MIT
The Requires
by Zach Brown
orm console silex doctrine web pimple datafixtures
Doctrine DataFixtures CLI command
This is a version of the Symfony 2 Doctrine Data Fixtures command that does NOT require symfony., (*2)
Via composer:, (*3)
php composer.phar require useallfive/doctrine-data-fixtures-command dev-master
If you don't already have your own version of the Doctrine CLI tool, you can copy the one provided with doctrine and place it wherever you see fit. For this example we'll place it in the project root. It's also worth mentioning that you can utilize a composer post install/update hook to take care of this for you., (*4)
cp vendor/bin/doctrine.php doctrine
Add the command to the $commands
array in your CLI script., (*5)
// ... $commands = array( new \UseAllFive\Command\LoadDataFixturesDoctrineCommand(), );
You're all set!, (*6)
Unlike the symfony 2 version of this, you'll need to specify a fixtures path., (*7)
php doctrine fixtures:load /path/to/fixtures
Doctrine DataFixtures CLI command
MIT
orm console silex doctrine web pimple datafixtures