Skip to content

ckuran/doctrine-data-fixtures-command

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doctrine DataFixtures command

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

About

Doctrine DataFixtures command

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%