forked from mrprompt/silex-api-skel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli-config.php
32 lines (28 loc) · 1.16 KB
/
cli-config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
use Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand;
use Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand;
use Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand;
use Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand;
use Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand;
use Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand;
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
use UseAllFive\Command\LoadDataFixturesDoctrineCommand;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Helper\DialogHelper;
$app = require __DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php';
$helperSet = new HelperSet(array(
'db' => new ConnectionHelper($app['doctrine_orm.em']->getConnection()),
'em' => new EntityManagerHelper($app['doctrine_orm.em']),
'dialog' => new DialogHelper(),
));
$commands = array(
new LoadDataFixturesDoctrineCommand(),
new DiffCommand(),
new ExecuteCommand(),
new GenerateCommand(),
new MigrateCommand(),
new StatusCommand(),
new VersionCommand()
);
return $helperSet;