doughnut-wedding/cli-config.php

22 lines
469 B
PHP
Raw Normal View History

2017-02-10 21:34:31 -08:00
<?php
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
use Symfony\Component\Console\Helper\HelperSet;
/**
* @var EntityManager $em
*/
$em = require 'doctrine.php';
$helperSet = new HelperSet([
'db' => new ConnectionHelper($em->getConnection()),
'em' => new EntityManagerHelper($em),
]);
return $helperSet;