rodrigonull/silex-doctrine-migrations-provider

A doctrine migrations provider for silex

0.2.0 2016-01-04 11:03 UTC

This package is not auto-updated.

Last update: 2024-05-06 11:30:43 UTC


README

A doctrine migrations provider for Silex.

Installation

Install the provider through Composer:

composer require rodrigonull/silex-doctrine-migrations-provider

Usage

Add the provider with your config...

<?php

$console = new \Symfony\Component\Console\Application();

$app->register(
    new \Null\Silex\Provider\DoctrineMigrationsProvider($console), 
    array(
        'migrations.directory'  => __DIR__ . '/../path/to/migrations',
        'migrations.name'       => 'Acme Migrations',
        'migrations.namespace'  => 'Acme\Migrations',
        'migrations.table_name' => 'acme_migrations',
    )
);

$app->boot();
$console->run();

Code coverage reports

$ bin/phpunit --coverage-html build/coverage --coverage-clover build/logs/clover.xml --log-junit build/logs/phpunit.xml

That was it!