DoctrineORMModule: --dry-run and --write-sql does not output the SQL statement to display.

screen shot 2013-12-05 at 1 27 33 am

Cause is outputWriter of doctrine/migrations is the closure of the null by default.

How can I set the closure of its own?

To try, I tried to modified as follows.

'migrations_configuration' => array(
    'orm_default' => array(
        'outputWriter' => call_user_func(function() {
            $output = new ConsoleOutput();
            return new OutputWriter(function($message) use ($output) {
                $output->writeln($message);
            });

        }),
    ),
),

MigrationsConfigurationFactory.php

$configuration = new Configuration($connection, $migrationsConfig['outputWriter']);

screen shot 2013-12-05 at 2 04 47 am

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

👍 Had to spend a half day before I found this bug =(