soy-php/doctrine-migrations-task

Doctrine Migrations task for Soy

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

Type:soy-task

pkg:composer/soy-php/doctrine-migrations-task

0.1.0 2015-12-11 14:28 UTC

This package is not auto-updated.

Last update: 2025-10-12 00:41:35 UTC


README

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;