Fixing Console helpers to not override the default helpers provided
This commit is contained in:
parent
efb33a8365
commit
aa70e6426d
@ -23,7 +23,7 @@ $connectionOptions = array(
|
||||
|
||||
$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
|
||||
|
||||
$helperSet = new \Symfony\Components\Console\Helper\HelperSet(array(
|
||||
$helpers = array(
|
||||
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
|
||||
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
|
||||
));
|
||||
);
|
@ -13,7 +13,10 @@ require __DIR__ . '/cli-config.php';
|
||||
|
||||
$cli = new \Symfony\Components\Console\Application('Doctrine Command Line Interface', Doctrine\Common\Version::VERSION);
|
||||
$cli->setCatchExceptions(true);
|
||||
$cli->setHelperSet($helperSet);
|
||||
$helperSet = $cli->getHelperSet();
|
||||
foreach ($helpers as $name => $helper) {
|
||||
$helperSet->set($helper, $name);
|
||||
}
|
||||
$cli->addCommands(array(
|
||||
// DBAL Commands
|
||||
new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
|
||||
|
Loading…
Reference in New Issue
Block a user