mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Change ORM instantiation position.
This commit is contained in:
@@ -68,19 +68,6 @@ $cli = new CLI("
|
||||
under certain conditions; type `about:license' for details.\n\n"
|
||||
. ' Phraseanet Developer Tools ', $version->getName() . ' ' . $version->getNumber());
|
||||
|
||||
if ($cli['configuration.store']->isSetup()) {
|
||||
$cli->loadPlugins();
|
||||
$helpers = [
|
||||
'db' => new ConnectionHelper($cli['orm.em']->getConnection()),
|
||||
'em' => new EntityManagerHelper($cli['orm.em'])
|
||||
];
|
||||
|
||||
$helperSet = $cli['console']->getHelperSet();
|
||||
foreach ($helpers as $name => $helper) {
|
||||
$helperSet->set($helper, $name);
|
||||
}
|
||||
}
|
||||
|
||||
$cli->command(new TranslationDumper());
|
||||
|
||||
$cli->command(new InstallAll());
|
||||
@@ -126,4 +113,19 @@ $cli['console']->addCommands([
|
||||
new VersionCommand(),
|
||||
]);
|
||||
|
||||
$cli->loadPlugins();
|
||||
|
||||
if ($cli['configuration.store']->isSetup()) {
|
||||
$cli->loadPlugins();
|
||||
$helpers = [
|
||||
'db' => new ConnectionHelper($cli['orm.em']->getConnection()),
|
||||
'em' => new EntityManagerHelper($cli['orm.em'])
|
||||
];
|
||||
|
||||
$helperSet = $cli['console']->getHelperSet();
|
||||
foreach ($helpers as $name => $helper) {
|
||||
$helperSet->set($helper, $name);
|
||||
}
|
||||
}
|
||||
|
||||
exit(is_int($cli->run()) ? : 1);
|
||||
|
Reference in New Issue
Block a user