useallfive/doctrine-data-fixtures-command

Doctrine DataFixtures CLI command

dev-master 2013-10-30 02:08 UTC

This package is not auto-updated.

Last update: 2024-04-22 23:43:30 UTC


README

SensioLabsInsight

This is a version of the Symfony 2 Doctrine Data Fixtures command that does NOT require symfony.

Installation

Via composer:

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.

cp vendor/bin/doctrine.php doctrine

Add the command to the $commands array in your CLI script.

// ...
$commands = array(
    new \UseAllFive\Command\LoadDataFixturesDoctrineCommand(),
);

You're all set!

Notes

Unlike the symfony 2 version of this, you'll need to specify a fixtures path.

php doctrine fixtures:load /path/to/fixtures