soy-php / doctrine-migrations-task
Doctrine Migrations task for Soy
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:soy-task
Requires
- soy-php/soy: 0.1.*
This package is not auto-updated.
Last update: 2024-11-09 19:45:27 UTC
README
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;