Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

OpenBuildings/silex-doctrine-migrations-provider

 
 

Repository files navigation

silex-doctrine-migrations-provider

A doctrine migrations provider for Silex.

Installation

Add the dependency to the require in your composer.json.

{
    "require": {
        "doctrine/migrations": "1.0.*@dev",
        "kurl/silex-doctrine-migrations-provider": "~0.1"
    }
}

Usage

Add the provider with your config...

<?php

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

$app->register(
    new \Kurl\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!

About

A doctrine migrations provider for Silex

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%