This is a Doctrine Migrations task for Soy
Include soy-php/doctrine-migrations-task
in your project with composer:
$ composer require soy-php/doctrine-migrations-task
In your recipe you can use the task as follows:
<?php
$recipe = new \Soy\Recipe();
$recipe->component('default', function (\Soy\DoctrineMigrations\MigrateTask $migrateTask) {
$migrateTask
->setBinary('./vendor/bin/doctrine-migrations')
->setCommandNamespace('migrations:')
->setConfiguration('migrations.yml')
->setDbConfiguration('db.php')
->setVerbose(true)
->run();
});
return $recipe;
When using Doctrine in combination with Symfony, you can use the following setup:
<?php
$recipe = new \Soy\Recipe();
$recipe->component('default', function (\Soy\DoctrineMigrations\MigrateTask $migrateTask) {
$migrateTask
->setBinary('./bin/console')
->setCommandNamespace('doctrine:migrations:')
->addArgument('-e dev')
->setVerbose(true)
->run();
});
return $recipe;