Skip to content

soy-php/doctrine-migrations-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doctrine Migrations Task

Latest Stable Version Total Downloads Latest Unstable Version License

Introduction

This is a Doctrine Migrations task for Soy

Usage

Include soy-php/doctrine-migrations-task in your project with composer:

$ composer require soy-php/doctrine-migrations-task

Standalone

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;

Symfony

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;

About

Doctrine Migrations task for Soy

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages