new ConnectionHelper($connection), ]); } /** * Runs console with the given helperset. * * @param Command[] $commands * * @return void */ public static function run(HelperSet $helperSet, $commands = []) { $cli = new Application('Doctrine Command Line Interface', Version::VERSION); $cli->setCatchExceptions(true); $cli->setHelperSet($helperSet); self::addCommands($cli); $cli->addCommands($commands); $cli->run(); } /** * @return void */ public static function addCommands(Application $cli) { $cli->addCommands([ new RunSqlCommand(), new ImportCommand(), new ReservedWordsCommand(), ]); } /** * Prints the instructions to create a configuration file */ public static function printCliConfigTemplate() { echo <<<'HELP' You are missing a "cli-config.php" or "config/cli-config.php" file in your project, which is required to get the Doctrine-DBAL Console working. You can use the following sample as a template: