2017 © Pedro Peláez
 

library doctrine-migrations-helper

Setup tool to provide configured Doctrine Migration Commands

image

rossriley/doctrine-migrations-helper

Setup tool to provide configured Doctrine Migration Commands

  • Friday, December 19, 2014
  • by rossriley
  • Repository
  • 1 Watchers
  • 3 Stars
  • 1,209 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Doctrine Migration Commands Helper

This package allows the setting up of the Doctrine CLI Tools with less Boilerplate and no Config Files., (*1)

You may want to use this if you prefer to initialise migrations from your own configuration / DI container rather than requiring an xml / yml migrations configuration file., (*2)

It depends on DBAL and must be initialised with a valid DriverConnection, (*3)

Usage

The set is designed to be passed straight to a Symfony Console Application, usage may be as follows:, (*4)

use DoctrineMigrationsHelper\CommandSet;

$set = new CommandSet($db_connection, $namespace, $directory);

$console->addCommands($set->getCommands());

The created configuration is available as a public property on the CommandSet so it can be manipulated in the same way as a normal Migrations configuration. For example:, (*5)

use DoctrineMigrationsHelper\CommandSet;

$set = new CommandSet($db_connection);
$set->configuration->setMigrationsNamespace("Example\Namespace");

$console->addCommands($set->getCommands());

All standard CLI tools are setup by default, you can override this by manually setting the $set->commands array with your own set., (*6)

Additionally if your DI constructs a migrations configuration you can just overwrite the auto created one. For example:, (*7)

$set = new CommandSet($container->get("db-connection"));
$set->configuration = $container->get("migrations");
$console->addCommands($set->getCommands());

The Versions

19/12 2014

dev-master

9999999-dev

Setup tool to provide configured Doctrine Migration Commands

  Sources   Download

MIT

The Requires

 

19/12 2014

1.0

1.0.0.0

Setup tool to provide configured Doctrine Migration Commands

  Sources   Download

MIT

The Requires